|
@@ -1,8 +1,8 @@
|
|
import React, { Component } from 'react';
|
|
import React, { Component } from 'react';
|
|
import style from './index.less';
|
|
import style from './index.less';
|
|
import { Tab, ConfirmModal, Notify } from '@commonComp';
|
|
import { Tab, ConfirmModal, Notify } from '@commonComp';
|
|
-import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin,whichTemp } 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 } from '@store/actions/tabTemplate';
|
|
|
|
+import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin } from '@store/async-actions/tabTemplate';
|
|
import { connect } from "react-redux";
|
|
import { connect } from "react-redux";
|
|
import store from '@store';
|
|
import store from '@store';
|
|
import { billing } from '@store/async-actions/pushMessage';
|
|
import { billing } from '@store/async-actions/pushMessage';
|
|
@@ -44,6 +44,7 @@ class PushContainer extends Component {
|
|
okColor: 'red',
|
|
okColor: 'red',
|
|
num: 0, //计数
|
|
num: 0, //计数
|
|
deptId:'', //科室id
|
|
deptId:'', //科室id
|
|
|
|
+ floderName:'', //文件夹名称
|
|
}
|
|
}
|
|
this.$cont = React.createRef();
|
|
this.$cont = React.createRef();
|
|
this.itemList = null;
|
|
this.itemList = null;
|
|
@@ -60,6 +61,8 @@ class PushContainer extends Component {
|
|
this.handleClose = this.handleClose.bind(this);
|
|
this.handleClose = this.handleClose.bind(this);
|
|
this.templateSearch = this.templateSearch.bind(this);
|
|
this.templateSearch = this.templateSearch.bind(this);
|
|
this.whichTemp = this.whichTemp.bind(this);
|
|
this.whichTemp = this.whichTemp.bind(this);
|
|
|
|
+ this.floderSlideToggle = this.floderSlideToggle.bind(this);
|
|
|
|
+ this.floderRename = this.floderRename.bind(this);
|
|
}
|
|
}
|
|
componentDidMount() {
|
|
componentDidMount() {
|
|
// const height = getWindowInnerHeight()-160;
|
|
// const height = getWindowInnerHeight()-160;
|
|
@@ -144,6 +147,12 @@ class PushContainer extends Component {
|
|
let val = (e.target.value).substring(0, 30)
|
|
let val = (e.target.value).substring(0, 30)
|
|
this.onchange(val)
|
|
this.onchange(val)
|
|
}
|
|
}
|
|
|
|
+ handleInputFst(e){
|
|
|
|
+ let val = (e.target.value).substring(0,30)
|
|
|
|
+ this.setState({
|
|
|
|
+ floderName: val
|
|
|
|
+ })
|
|
|
|
+ }
|
|
changeTitle() {
|
|
changeTitle() {
|
|
return <div className={style['box']}>
|
|
return <div className={style['box']}>
|
|
<input className={style['ipt']}
|
|
<input className={style['ipt']}
|
|
@@ -231,7 +240,43 @@ class PushContainer extends Component {
|
|
let tmpPage = ++page
|
|
let tmpPage = ++page
|
|
store.dispatch(initItemList(tmpPage,true))
|
|
store.dispatch(initItemList(tmpPage,true))
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ floderRename(){//文件夹重命名
|
|
|
|
+ this.setState({
|
|
|
|
+ type: 5,
|
|
|
|
+ message:'文件夹重命名',
|
|
|
|
+ title: '文件夹重命名',
|
|
|
|
+ text: 'text',
|
|
|
|
+ okText: '保存',
|
|
|
|
+ okBorderColor: '#3B9ED0',
|
|
|
|
+ okColor: '#fff',
|
|
|
|
+ oKBg: '#3B9ED0'
|
|
|
|
+ })
|
|
|
|
+ store.dispatch(changeVisible(true))
|
|
|
|
+ }
|
|
|
|
+ changeTitle() {
|
|
|
|
+ return <div className={style['box']}>
|
|
|
|
+ <div className={style['iptWrap']}>
|
|
|
|
+ <div className={style.name}>
|
|
|
|
+ <span className={style.leftName}>文件夹名称:</span>
|
|
|
|
+ <input className={style['ipt']}
|
|
|
|
+ placeholder="请输入文件夹名称"
|
|
|
|
+ type="text"
|
|
|
|
+ maxLength='30'
|
|
|
|
+ onInput={(e) => {
|
|
|
|
+ this.handleInput(e)
|
|
|
|
+ }}
|
|
|
|
+ onPropertyChange={(e) => { // 兼容ie
|
|
|
|
+ this.handleInput(e)
|
|
|
|
+ }}
|
|
|
|
+ onKeyPress={e => this.keypress(e)}
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ }
|
|
|
|
+ floderDelete(){//文件夹删除
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
makeSure() {
|
|
makeSure() {
|
|
if (this.state.type == 1) {
|
|
if (this.state.type == 1) {
|
|
if(this.props.admin){
|
|
if(this.props.admin){
|
|
@@ -281,6 +326,13 @@ class PushContainer extends Component {
|
|
}
|
|
}
|
|
whichTemp(tab){
|
|
whichTemp(tab){
|
|
store.dispatch(whichTemp(tab))
|
|
store.dispatch(whichTemp(tab))
|
|
|
|
+ store.dispatch(initAdminItemList(1,true))
|
|
|
|
+ }
|
|
|
|
+ floderSlideToggle(id){
|
|
|
|
+ store.dispatch(floderSlide(id))
|
|
|
|
+ }
|
|
|
|
+ floderActionDo(id){
|
|
|
|
+ store.dispatch(floderAction(id))
|
|
}
|
|
}
|
|
render() {
|
|
render() {
|
|
const { activeId, checkItems,selectTemp, visible, showMsg,hasMore,current, items, allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin,clearSearch } = this.props;
|
|
const { activeId, checkItems,selectTemp, visible, showMsg,hasMore,current, items, allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin,clearSearch } = this.props;
|
|
@@ -315,6 +367,10 @@ class PushContainer extends Component {
|
|
templateSearch={this.templateSearch}
|
|
templateSearch={this.templateSearch}
|
|
whichTemp={this.whichTemp}
|
|
whichTemp={this.whichTemp}
|
|
selectTemp={selectTemp}
|
|
selectTemp={selectTemp}
|
|
|
|
+ floderSlide={this.floderSlideToggle}
|
|
|
|
+ floderAction={this.floderActionDo}
|
|
|
|
+ floderDelete={this.floderDelete}
|
|
|
|
+ floderRename={this.floderRename}
|
|
></TemplateItems>
|
|
></TemplateItems>
|
|
<MedicalInfoContainer></MedicalInfoContainer>
|
|
<MedicalInfoContainer></MedicalInfoContainer>
|
|
</TemplateContainer>
|
|
</TemplateContainer>
|
|
@@ -323,6 +379,7 @@ class PushContainer extends Component {
|
|
visible={visible}
|
|
visible={visible}
|
|
confirm={this.makeSure}
|
|
confirm={this.makeSure}
|
|
close={this.handleClose}
|
|
close={this.handleClose}
|
|
|
|
+ title={this.state.title}
|
|
cancel={this.handleClose}
|
|
cancel={this.handleClose}
|
|
okText={this.state.okText}
|
|
okText={this.state.okText}
|
|
okBorderColor={this.state.okBorderColor}
|
|
okBorderColor={this.state.okBorderColor}
|