|
@@ -1,8 +1,8 @@
|
|
|
import React, { Component } from 'react';
|
|
|
import style from './index.less';
|
|
|
import { Tab, ConfirmModal, Notify } from '@commonComp';
|
|
|
-import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin } from '@store/actions/tabTemplate';
|
|
|
-import { initItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin } from '@store/async-actions/tabTemplate';
|
|
|
+import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin,whichTemp,floderSlide,floderAction,folderModal,clearSearchTemplateNorms,folderOrder,getDptLis } from '@store/actions/tabTemplate';
|
|
|
+import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList,delFloder,addTemplateQuote,newFloder,findTemplateNorms,getFloderListAll,getDepartments } from '@store/async-actions/tabTemplate';
|
|
|
import { connect } from "react-redux";
|
|
|
import store from '@store';
|
|
|
import { billing } from '@store/async-actions/pushMessage';
|
|
@@ -12,7 +12,15 @@ import PushItemsContainer from '@containers/PushItemsContainer';
|
|
|
import { pushAllDataList, getWindowInnerHeight, didPushParamChange } from '@utils/tools';
|
|
|
import CopyRightContainer from "@containers/CopyRightContainer";
|
|
|
import MedicalInfoContainer from '@containers/MedicalInfoContainer';
|
|
|
+import FolderName from '@components/FolderName';
|
|
|
+// import Search from './../Operation/Search';
|
|
|
+import Search from './Search';
|
|
|
+import slideDown from '@common/images/slideDown.png';
|
|
|
import CaseQuailty from "../CaseQuailty";
|
|
|
+import check_circle from './img/check-circle.png';
|
|
|
+import check_right from './img/check-right.png';
|
|
|
+import pinyin from '@utils/Convert_Pinyin.js';
|
|
|
+import $ from "jquery";
|
|
|
|
|
|
class PushContainer extends Component {
|
|
|
constructor(props) {
|
|
@@ -44,6 +52,18 @@ class PushContainer extends Component {
|
|
|
okColor: 'red',
|
|
|
num: 0, //计数
|
|
|
deptId:'', //科室id
|
|
|
+ value:'',//科室name
|
|
|
+ sex:'3',
|
|
|
+ floderName:'', //文件夹名称
|
|
|
+ folderListShow:false,
|
|
|
+ folderNameVal:'',
|
|
|
+ folderId:'',
|
|
|
+ spell:'',
|
|
|
+ fstName:'',
|
|
|
+ tmpFolder:'',
|
|
|
+ hasCalcIndex: false,
|
|
|
+ hospitalDeptName:'',
|
|
|
+ reset: false
|
|
|
}
|
|
|
this.$cont = React.createRef();
|
|
|
this.itemList = null;
|
|
@@ -59,13 +79,30 @@ class PushContainer extends Component {
|
|
|
this.makeSure = this.makeSure.bind(this)
|
|
|
this.handleClose = this.handleClose.bind(this);
|
|
|
this.templateSearch = this.templateSearch.bind(this);
|
|
|
+ this.clearTemplateSearch = this.clearTemplateSearch.bind(this)
|
|
|
+ this.whichTemp = this.whichTemp.bind(this);
|
|
|
+ this.floderSlideToggle = this.floderSlideToggle.bind(this);
|
|
|
+ this.floderRename = this.floderRename.bind(this);
|
|
|
+ this.handleInputFloder = this.handleInputFloder.bind(this);
|
|
|
+ this.setFolderId = this.setFolderId.bind(this);
|
|
|
+ this.floderDelete = this.floderDelete.bind(this);
|
|
|
+ this.folderManage = this.folderManage.bind(this);
|
|
|
+ this.changeRadio = this.changeRadio.bind(this);
|
|
|
+ this.handleChangeIpt = this.handleChangeIpt.bind(this);
|
|
|
+ this.setDeptId = this.setDeptId.bind(this);
|
|
|
+ this.handleClearValue = this.handleClearValue.bind(this);
|
|
|
+ this.clearReset = this.clearReset.bind(this);
|
|
|
}
|
|
|
componentDidMount() {
|
|
|
// const height = getWindowInnerHeight()-160;
|
|
|
// this.$cont.current.style.height = height+"px";
|
|
|
}
|
|
|
- templateSearch(name){
|
|
|
- store.dispatch(initItemList(1,name));
|
|
|
+
|
|
|
+ templateSearch(name,selectTemp){
|
|
|
+ store.dispatch(initItemList(1,name,selectTemp));
|
|
|
+ }
|
|
|
+ clearTemplateSearch(){
|
|
|
+ store.dispatch(clearSearchTemplateNorms());
|
|
|
}
|
|
|
/**
|
|
|
*
|
|
@@ -76,14 +113,25 @@ class PushContainer extends Component {
|
|
|
document.getElementById("searchTmp").value = ""
|
|
|
// let searchVal = document.getElementById("searchTmp").value
|
|
|
store.dispatch(initItemList(1,0));
|
|
|
+ store.dispatch(getFloderListAll())
|
|
|
+ this.setState({
|
|
|
+ reset: true
|
|
|
+ })
|
|
|
+ $(".floderSlideLis").eq(0).next().slideDown()
|
|
|
+ store.dispatch(whichTemp(1))
|
|
|
}
|
|
|
store.dispatch(tabChange(id))
|
|
|
}
|
|
|
+ clearReset() {
|
|
|
+ this.setState({
|
|
|
+ reset: false
|
|
|
+ })
|
|
|
+ }
|
|
|
/**
|
|
|
* 引用模板id
|
|
|
* @param {模板id} id
|
|
|
*/
|
|
|
- handleContentClick(id, sex) {
|
|
|
+ handleContentClick(id, sex,hasCalcIndex) {
|
|
|
let baseSex = store.getState().patInfo.message.sex
|
|
|
this.setState({
|
|
|
message: this.content(sex, baseSex),
|
|
@@ -92,11 +140,15 @@ class PushContainer extends Component {
|
|
|
okText: '引用',
|
|
|
okBorderColor: '#3B9ED0',
|
|
|
okColor: '#fff',
|
|
|
- oKBg: '#3B9ED0'
|
|
|
+ oKBg: '#3B9ED0',
|
|
|
}, () => {
|
|
|
store.dispatch(changeVisible(true))
|
|
|
})
|
|
|
+ this.setState({
|
|
|
+ hasCalcIndex: hasCalcIndex
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
content(sex, baseSex) {
|
|
|
if (sex != 3 && sex != baseSex) {
|
|
|
return <p className={style['center']}>确认引用该模板?<p style={{ fontSize: '12px', color: '#6b6969', marginTop: '10px' }}>引用该模版可能显示有误</p></p>
|
|
@@ -108,10 +160,11 @@ class PushContainer extends Component {
|
|
|
* 删除模板
|
|
|
* @param {模板id} id
|
|
|
*/
|
|
|
- handleTemplateDel(id) {
|
|
|
+ handleTemplateDel(id,folderId) {
|
|
|
this.setState({
|
|
|
message: this.delDiv(),
|
|
|
type: 1,
|
|
|
+ folderId:folderId,
|
|
|
id: id,
|
|
|
okText: '删除',
|
|
|
okBorderColor: 'red',
|
|
@@ -140,43 +193,107 @@ class PushContainer extends Component {
|
|
|
}
|
|
|
}
|
|
|
handleInput(e) {
|
|
|
- let val = (e.target.value).substring(0, 30)
|
|
|
+ let val = (e.target.value).substring(0, 20)
|
|
|
this.onchange(val)
|
|
|
}
|
|
|
- changeTitle() {
|
|
|
+ handleInputFloder(e){
|
|
|
+ let val = (e.target.value).substring(0,20)
|
|
|
+ this.setState({
|
|
|
+ floderName: val
|
|
|
+ },()=>{
|
|
|
+ this.setState({
|
|
|
+ message:this.changeFloderTitle()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ handleInputFst(e){
|
|
|
+ let val = (e.target.value).substring(0,20).replace(/[^a-zA-Z]/g,'')
|
|
|
+ // console.log(val)
|
|
|
+ $(e.target).val(val)
|
|
|
+ this.setState({
|
|
|
+ fstName: val
|
|
|
+ }, () => {
|
|
|
+ this.setState({
|
|
|
+ message: this.changeTitle(),
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ spellFst(){
|
|
|
+ let tmpFst = pinyin.getCamelChars(this.state.title);
|
|
|
+ // console.log(tmpFst.substr(0,1).toUpperCase())
|
|
|
+ this.setState({fstName:tmpFst.toUpperCase()})
|
|
|
+ // this.$inp.current.vaule = tmpFst
|
|
|
+ document.getElementById ('FstInp').value=tmpFst.toUpperCase()
|
|
|
+
|
|
|
+ }
|
|
|
+ changeTitle() {//模板名称修改
|
|
|
return <div className={style['box']}>
|
|
|
- <input className={style['ipt']}
|
|
|
- placeholder="请输入模板名称"
|
|
|
- type="text"
|
|
|
- value={this.state.title}
|
|
|
- maxLength='30'
|
|
|
- onInput={(e) => {
|
|
|
- this.handleInput(e)
|
|
|
- }}
|
|
|
- onPropertyChange={(e) => { // 兼容ie
|
|
|
- this.handleInput(e)
|
|
|
- }}
|
|
|
- onKeyPress={e => this.keypress(e)}
|
|
|
- />
|
|
|
- <div className={style['line']}></div>
|
|
|
+ <div className={style['iptWrap']}>
|
|
|
+ <div className={style.name}>
|
|
|
+ <span className={style.leftName}>模板名称:</span>
|
|
|
+ <input className={style['ipt']}
|
|
|
+ autocomplete="off"
|
|
|
+ placeholder="请输入模板名称"
|
|
|
+ type="text"
|
|
|
+ maxLength='20'
|
|
|
+ value={this.state.title}
|
|
|
+ onInput={(e) => {
|
|
|
+ this.handleInput(e)
|
|
|
+ }}
|
|
|
+ onPropertyChange={(e) => { // 兼容ie
|
|
|
+ this.handleInput(e)
|
|
|
+ }}
|
|
|
+ onKeyPress={e => this.keypress(e)}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div className={`${style.name} ${style.firstname}`}>
|
|
|
+ <span className={style.leftName}>模板名首拼:</span>
|
|
|
+ <input className={style['ipt']}
|
|
|
+ autocomplete="off"
|
|
|
+ placeholder=""
|
|
|
+ type="text"
|
|
|
+ maxLength='20'
|
|
|
+ id="FstInp"
|
|
|
+ value={this.state.fstName}
|
|
|
+ onFocus={() =>this.spellFst()}
|
|
|
+ onInput={(e) => {
|
|
|
+ this.handleInputFst(e)
|
|
|
+ }}
|
|
|
+ onPropertyChange={(e) => { // 兼容ie
|
|
|
+ this.handleInputFst(e)
|
|
|
+ }}
|
|
|
+ onKeyPress={e => this.keypress(e)}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
}
|
|
|
/**
|
|
|
* 改变模板标题
|
|
|
* @param {模板id和模板title} obj
|
|
|
*/
|
|
|
- handleTitleChange(id, text,deptId) {
|
|
|
+ handleTitleChange(id, text,deptId,folderId,spell,folderName,sex,hospitalDeptName) {
|
|
|
store.dispatch(changeVisible(true))
|
|
|
+ this.props.admin&&store.dispatch(getFloderList())
|
|
|
this.setState({
|
|
|
type: 3,
|
|
|
currId: id,
|
|
|
title: text,
|
|
|
text: text,
|
|
|
deptId: deptId,
|
|
|
+ fstName:spell,
|
|
|
okText: '保存',
|
|
|
okBorderColor: '#3B9ED0',
|
|
|
okColor: '#fff',
|
|
|
- oKBg: '#3B9ED0'
|
|
|
+ oKBg: '#3B9ED0',
|
|
|
+ folderId:folderId,
|
|
|
+ sex: sex,
|
|
|
+ spell:spell,
|
|
|
+ folderNameVal:folderName,
|
|
|
+ tmpFolder:folderName,
|
|
|
+ value:hospitalDeptName
|
|
|
+
|
|
|
}, () => {
|
|
|
this.setState({
|
|
|
message: this.changeTitle(),
|
|
@@ -186,9 +303,9 @@ class PushContainer extends Component {
|
|
|
|
|
|
handleAllCheckboxAdmin() { //全.反选
|
|
|
let tmpFlg = this.props.allCheckedAdmin;
|
|
|
- if (this.props.checkItemsAdmin.length < this.props.adminItems.length && this.props.allCheckedAdmin) {
|
|
|
+ if (this.props.checkItemsAdmin.length < this.props.folderListContentArr.length && this.props.allCheckedAdmin) {
|
|
|
tmpFlg = false;
|
|
|
- } else if (this.props.checkItemsAdmin.length == this.props.adminItems.length && !this.props.allCheckedAdmin) {
|
|
|
+ } else if (this.props.checkItemsAdmin.length == this.props.folderListContentArr.length && !this.props.allCheckedAdmin) {
|
|
|
tmpFlg = true;
|
|
|
} //两种特殊情况处理
|
|
|
store.dispatch(allCheckedAdmin(!tmpFlg))
|
|
@@ -230,56 +347,239 @@ class PushContainer extends Component {
|
|
|
let tmpPage = ++page
|
|
|
store.dispatch(initItemList(tmpPage,true))
|
|
|
}
|
|
|
-
|
|
|
+ floderRename(name,id){//文件夹重命名
|
|
|
+ this.setState({
|
|
|
+ type: 5,
|
|
|
+ title: '重命名文件夹',
|
|
|
+ okText: '保存',
|
|
|
+ floderName:name,
|
|
|
+ folderId:id,
|
|
|
+ okBorderColor: '#3B9ED0',
|
|
|
+ okColor: '#fff',
|
|
|
+ oKBg: '#3B9ED0',
|
|
|
+ },()=>{
|
|
|
+ this.setState({
|
|
|
+ message:this.changeFloderTitle()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ store.dispatch(changeVisible(true))
|
|
|
+ }
|
|
|
+ changeFloderTitle() {
|
|
|
+ return <div className={style['box']}>
|
|
|
+ <div className={style['iptWrap']}>
|
|
|
+ <div className={style.name}>
|
|
|
+ <span className={style.leftName}>名称:</span>
|
|
|
+ <input
|
|
|
+ autocomplete="off"
|
|
|
+ placeholder="请输入文件夹名称"
|
|
|
+ type="text"
|
|
|
+ maxLength='20'
|
|
|
+ value={this.state.floderName}
|
|
|
+ onInput={(e) => {
|
|
|
+ this.handleInputFloder(e)
|
|
|
+ }}
|
|
|
+ onPropertyChange={(e) => { // 兼容ie
|
|
|
+ this.handleInputFloder(e)
|
|
|
+ }}
|
|
|
+ onKeyPress={e => this.keypress(e)}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ floderDelete(folderId){//文件夹删除
|
|
|
+ this.setState({
|
|
|
+ message: <p className={style['center']}>确认删除文件夹?</p>,
|
|
|
+ type: 6,
|
|
|
+ folderId:folderId,
|
|
|
+ okText: '删除',
|
|
|
+ okBorderColor: 'red',
|
|
|
+ okColor: 'red',
|
|
|
+ oKBg: '#fff'
|
|
|
+ }, () => {
|
|
|
+ store.dispatch(changeVisible(true))
|
|
|
+ })
|
|
|
+ // store.dispatch(delFloder(id))
|
|
|
+
|
|
|
+ }
|
|
|
+ changeRadio(sex){
|
|
|
+ if(sex == 1){
|
|
|
+ $('#commonSex img').attr('src',check_right)
|
|
|
+ $('#maleSex img').attr('src',check_circle)
|
|
|
+ $('#femaleSex img').attr('src',check_circle)
|
|
|
+ $('#commonSex i').css('color','#000')
|
|
|
+ $('#maleSex i').css('color','#6b6969')
|
|
|
+ $('#femaleSex i').css('color','#6b6969')
|
|
|
+ this.setState({sex:'3'})
|
|
|
+ }else if(sex == 2){
|
|
|
+ $('#commonSex img').attr('src',check_circle)
|
|
|
+ $('#maleSex img').attr('src',check_right)
|
|
|
+ $('#femaleSex img').attr('src',check_circle)
|
|
|
+ $('#commonSex i').css('color','#6b6969')
|
|
|
+ $('#maleSex i').css('color','#000')
|
|
|
+ $('#femaleSex i').css('color','#6b6969')
|
|
|
+ this.setState({sex:'1'})
|
|
|
+ }else if(sex == 3){
|
|
|
+ $('#commonSex img').attr('src',check_circle)
|
|
|
+ $('#maleSex img').attr('src',check_circle)
|
|
|
+ $('#femaleSex img').attr('src',check_right)
|
|
|
+ $('#commonSex i').css('color','#6b6969')
|
|
|
+ $('#maleSex i').css('color','#6b6969')
|
|
|
+ $('#femaleSex i').css('color','#000')
|
|
|
+ this.setState({sex:'2'})
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
makeSure() {
|
|
|
- if (this.state.type == 1) {
|
|
|
+ const {type,id,title,tmpFolder,folderNameVal,text,fstName,spell,currId,deptId,folderId,floderName,sex,hospitalDeptName} = this.state
|
|
|
+ if (type == 1) {
|
|
|
if(this.props.admin){
|
|
|
- store.dispatch(delItemAdmin(this.state.id))
|
|
|
+ store.dispatch(delItemAdmin(id,folderId))
|
|
|
}else{
|
|
|
- store.dispatch(delItem(this.state.id))
|
|
|
+ store.dispatch(delItem(id))
|
|
|
}
|
|
|
store.dispatch(changeVisible(false))
|
|
|
- } else if (this.state.type == 2) {
|
|
|
+ } else if (type == 2) {
|
|
|
if(this.props.admin){
|
|
|
store.dispatch(delBatchItemAdmin(this.props.checkItemsAdmin))
|
|
|
}else{
|
|
|
store.dispatch(delBatchItem(this.props.checkItems))
|
|
|
}
|
|
|
store.dispatch(changeVisible(false))
|
|
|
- } else if (this.state.type == 3) {
|
|
|
- if (this.state.title == this.state.text) {
|
|
|
- store.dispatch(changeVisible(false))
|
|
|
- Notify.success('标题修改成功');
|
|
|
- return;
|
|
|
- }
|
|
|
- if ((this.state.title).trim() == '') {
|
|
|
+ } else if (type == 3) {
|
|
|
+ // if (title == text &&tmpFolder==folderNameVal&&fstName==spell&&deptId) {
|
|
|
+ // store.dispatch(changeVisible(false))
|
|
|
+ // Notify.success('标题修改成功');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ if (title.trim() == '') {
|
|
|
Notify.info('请输入模板名称');
|
|
|
return;
|
|
|
+ }else if(fstName.trim() == ''){
|
|
|
+ Notify.error('请输入模板名首拼')
|
|
|
+ return;
|
|
|
+ }else if(this.props.admin&&deptId == ''){
|
|
|
+ Notify.error('请选择科室')
|
|
|
+ return;
|
|
|
}
|
|
|
let tempObj = {
|
|
|
- id: this.state.currId,
|
|
|
- title: this.state.title,
|
|
|
- deptId:this.state.deptId
|
|
|
+ id: currId,
|
|
|
+ title: title,
|
|
|
+ deptId:deptId,
|
|
|
+ folderId:folderId,
|
|
|
+ folderName:folderNameVal,
|
|
|
+ spell:fstName,
|
|
|
+ sex: sex,
|
|
|
+ hospitalDeptName:hospitalDeptName
|
|
|
}
|
|
|
if(this.props.admin){
|
|
|
store.dispatch(changeTitleAsyncAdmin(tempObj))
|
|
|
}else{
|
|
|
store.dispatch(changeTitleAsync(tempObj))
|
|
|
}
|
|
|
- } else if (this.state.type == 4) { //模板引入
|
|
|
+ } else if (type == 4) { //模板引入
|
|
|
if(this.props.admin){
|
|
|
- store.dispatch(setPageViewAdmin(this.state.id))
|
|
|
+ store.dispatch(setPageViewAdmin(id))
|
|
|
}else{
|
|
|
- store.dispatch(setPageView(this.state.id))
|
|
|
+ store.dispatch(setPageView(id))
|
|
|
+ const hasCalcIndex = this.state.hasCalcIndex
|
|
|
+ if(hasCalcIndex) {
|
|
|
+ store.dispatch(addTemplateQuote(id))
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ hasCalcIndex: false
|
|
|
+ })
|
|
|
}
|
|
|
store.dispatch(changeVisible(false))
|
|
|
+ } else if(type == 6) { //删除文件夹
|
|
|
+ if(this.props.admin){
|
|
|
+ store.dispatch(delFloder(folderId))
|
|
|
+ store.dispatch(changeVisible(false))
|
|
|
+ }else{
|
|
|
+ // store.dispatch(delFloder(folderId))
|
|
|
+ // store.dispatch(delBatchItem(this.props.checkItems))
|
|
|
+ }
|
|
|
+ } else if(type == 5) {
|
|
|
+ if(this.props.admin){
|
|
|
+ store.dispatch(newFloder(floderName,folderId,'modify'))
|
|
|
+ // store.dispatch(changeVisible(false))
|
|
|
+ }else{
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
handleClose() {
|
|
|
store.dispatch(changeVisible(false));
|
|
|
+ this.setState({
|
|
|
+ hasCalcIndex: false,
|
|
|
+ folderListShow: false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ whichTemp(tab,name,hasSearch){
|
|
|
+ if(tab!=2||!name){
|
|
|
+ if(tab == 1 && name&&hasSearch) {
|
|
|
+ this.templateSearch(name,1)
|
|
|
+ } else {
|
|
|
+ store.dispatch(initAdminItemList(1,true))
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.templateSearch(name,2)
|
|
|
+ }
|
|
|
+ store.dispatch(whichTemp(tab))
|
|
|
+ }
|
|
|
+ floderSlideToggle(id){
|
|
|
+ store.dispatch(floderSlide(id))
|
|
|
+ }
|
|
|
+ floderActionDo(id){
|
|
|
+ store.dispatch(floderAction(id))
|
|
|
+ }
|
|
|
+ handleFolderShow(){
|
|
|
+ const {folderListShow} = this.state
|
|
|
+ this.setState({
|
|
|
+ folderListShow:!folderListShow
|
|
|
+ })
|
|
|
+ }
|
|
|
+ setFolderId(id,name){//文件夹
|
|
|
+ this.setState({
|
|
|
+ folderId :id,
|
|
|
+ folderNameVal:name,
|
|
|
+ folderListShow:false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ newFolder(flg){
|
|
|
+ store.dispatch(folderModal(flg))
|
|
|
+ }
|
|
|
+ folderManage(flg) {
|
|
|
+ store.dispatch(folderOrder(flg))
|
|
|
+ }
|
|
|
+ handleChangeValue(val) {
|
|
|
+ val && store.dispatch(getDepartments(val))
|
|
|
+ }
|
|
|
+ handleChangeIpt(val){//搜索科室
|
|
|
+ if(val == ''){
|
|
|
+ this.setState({
|
|
|
+ deptId:'',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ value:val
|
|
|
+ })
|
|
|
+ }
|
|
|
+ setDeptId(id,name){
|
|
|
+ this.handleClearValue()
|
|
|
+ this.setState({
|
|
|
+ deptId :id,
|
|
|
+ value:name
|
|
|
+ })
|
|
|
+ }
|
|
|
+ handleClearValue () {
|
|
|
+ store.dispatch(getDptLis([]))
|
|
|
}
|
|
|
render() {
|
|
|
- const { activeId, checkItems, visible, showMsg,hasMore,current, items, allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin,clearSearch } = this.props;
|
|
|
+ const { activeId, checkItems,selectTemp,folderListContentArr, visible, showMsg,hasMore,current,floderListAdmin, items, allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin,clearSearch, templateNormsSearchList, departLis} = this.props;
|
|
|
+ const { type,okBorderColor,okColor,oKBg,okText,message,folderListShow,value,reset } = this.state
|
|
|
+ const { handleChangeValue, handleChangeIpt} = this
|
|
|
return <div className={style["container"]} ref={this.$cont} >
|
|
|
<Tab tabs={this.state.tabs}
|
|
|
activeId={activeId}
|
|
@@ -309,6 +609,17 @@ class PushContainer extends Component {
|
|
|
handleAllCheckbox={this.handleAllCheckbox}
|
|
|
handleClickGetMore={this.handleClickGetMore}
|
|
|
templateSearch={this.templateSearch}
|
|
|
+ whichTemp={this.whichTemp}
|
|
|
+ selectTemp={selectTemp}
|
|
|
+ floderSlide={this.floderSlideToggle}
|
|
|
+ floderAction={this.floderActionDo}
|
|
|
+ floderDelete={this.floderDelete}
|
|
|
+ floderRename={this.floderRename}
|
|
|
+ folderListContentArr={folderListContentArr}
|
|
|
+ templateNormsSearchList={templateNormsSearchList}
|
|
|
+ clearTemplateSearch={this.clearTemplateSearch}
|
|
|
+ reset = {reset}
|
|
|
+ clearReset = {this.clearReset}
|
|
|
></TemplateItems>
|
|
|
<MedicalInfoContainer></MedicalInfoContainer>
|
|
|
</TemplateContainer>
|
|
@@ -317,13 +628,79 @@ class PushContainer extends Component {
|
|
|
visible={visible}
|
|
|
confirm={this.makeSure}
|
|
|
close={this.handleClose}
|
|
|
+ title={type==5?'重命名文件夹':type==3?'修改模板':null}
|
|
|
cancel={this.handleClose}
|
|
|
- okText={this.state.okText}
|
|
|
- okBorderColor={this.state.okBorderColor}
|
|
|
- okColor={this.state.okColor}
|
|
|
- oKBg={this.state.oKBg}
|
|
|
+ okText={okText}
|
|
|
+ width={type==5 ? 500: type==3?580:300}
|
|
|
+ height={type==3&&admin?280:200}
|
|
|
+ okBorderColor={okBorderColor}
|
|
|
+ okColor={okColor}
|
|
|
+ oKBg={oKBg}
|
|
|
+ borderBtm={type==5||type==3?'1px solid #ccc':null}
|
|
|
>
|
|
|
- {this.state.message}
|
|
|
+ {message}
|
|
|
+ {
|
|
|
+ admin&&type==3?<div>
|
|
|
+ <div className={style.iptWrap}>
|
|
|
+ <div className={style.male}>
|
|
|
+ <span className={style.leftName}>性别归属:</span>
|
|
|
+ <span className={style['commonSex']} id="commonSex" onClick={this.changeRadio.bind(this,1)}><img src={check_right} alt=""/><i style={{color:'#000'}}>通用</i></span>
|
|
|
+ <span id="maleSex" onClick={this.changeRadio.bind(this,2)}><img src={check_circle} alt=""/><i>男</i></span>
|
|
|
+ <span id="femaleSex" onClick={this.changeRadio.bind(this,3)}><img src={check_circle} alt=""/><i>女</i></span>
|
|
|
+ <span style={{paddingRight:0,color:'#777777'}}>(注:错误引用,显示可能有误)</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div className={style.department}>
|
|
|
+ <span className={style.leftName}>科室归属:</span>
|
|
|
+ <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true} zIndex={11}>
|
|
|
+ {
|
|
|
+ departLis.length>0&&value&&<ul className={style.departLis}>
|
|
|
+ {
|
|
|
+ departLis.map((item,idx)=>{
|
|
|
+ return <li onClick={()=>this.setDeptId(item.id,item.conceptDeptName)}>
|
|
|
+ {item.conceptDeptName}
|
|
|
+ </li>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </ul>
|
|
|
+ }
|
|
|
+ </Search>
|
|
|
+ <span style={{paddingRight:0,color:'#777777'}}>(支持汉字关键字搜索)</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div className={style.department}>
|
|
|
+ <span className={style.leftName}>存储为:</span>
|
|
|
+ <div className={style.selectFolder} onClick={(e) => {
|
|
|
+ this.handleFolderShow(e)
|
|
|
+ }}>
|
|
|
+ <input className={style.selectFolderIpt}
|
|
|
+ autocomplete="off"
|
|
|
+ type="text"
|
|
|
+ maxLength='20'
|
|
|
+ readOnly
|
|
|
+ value={this.state.folderNameVal}
|
|
|
+
|
|
|
+ />
|
|
|
+ <img src={slideDown} alt=""/>
|
|
|
+ {
|
|
|
+ floderListAdmin.length>0&&folderListShow&&<ul className={`${style.departLis} ${style.departLisFolder}`}>
|
|
|
+ {
|
|
|
+ floderListAdmin.map((item,idx)=>{
|
|
|
+ return <li onClick={()=>this.setFolderId(item.id,item.name)}>
|
|
|
+ {item.name}
|
|
|
+ </li>
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </ul>
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <span className={style.newFolder} onClick={()=>this.newFolder(true)}>新建文件夹</span>
|
|
|
+ <span className={style.mangerFolder} onClick={()=>this.folderManage(true)}>管理文件夹</span>
|
|
|
+ </div>
|
|
|
+ </div>:null
|
|
|
+ }
|
|
|
</ConfirmModal>
|
|
|
<CopyRightContainer />
|
|
|
</div>
|
|
@@ -348,6 +725,11 @@ const mapStateToProps = (state) => {//console.log(state)
|
|
|
allCheckShowAdmin: state.tabTemplate.allCheckShowAdmin,
|
|
|
checkItemsAdmin: state.tabTemplate.checkItemsAdmin,
|
|
|
clearSearch:state.print.clearSearch,
|
|
|
+ departLis: state.tabTemplate.departLis,
|
|
|
+ selectTemp:state.tabTemplate.selectTemp,
|
|
|
+ floderListAdmin:state.tabTemplate.floderListAdmin,
|
|
|
+ folderListContentArr:state.tabTemplate.folderListContentArr,
|
|
|
+ templateNormsSearchList: state.tabTemplate.templateNormsSearchList
|
|
|
}
|
|
|
}
|
|
|
|