|
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|
|
import style from './index.less';
|
|
|
import { Tab, ConfirmModal, Notify } from '@commonComp';
|
|
|
import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin,whichTemp,floderSlide,floderAction,folderModal } from '@store/actions/tabTemplate';
|
|
|
-import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList } from '@store/async-actions/tabTemplate';
|
|
|
+import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList,delFloder } from '@store/async-actions/tabTemplate';
|
|
|
import { connect } from "react-redux";
|
|
|
import store from '@store';
|
|
|
import { billing } from '@store/async-actions/pushMessage';
|
|
@@ -74,6 +74,7 @@ class PushContainer extends Component {
|
|
|
this.floderRename = this.floderRename.bind(this);
|
|
|
this.handleInputFloder = this.handleInputFloder.bind(this);
|
|
|
this.setFolderId = this.setFolderId.bind(this);
|
|
|
+ this.floderDelete = this.floderDelete.bind(this)
|
|
|
}
|
|
|
componentDidMount() {
|
|
|
// const height = getWindowInnerHeight()-160;
|
|
@@ -332,10 +333,22 @@ class PushContainer extends Component {
|
|
|
</div>
|
|
|
</div>
|
|
|
}
|
|
|
- floderDelete(id){//文件夹删除
|
|
|
- console.log('id', id)
|
|
|
- store.dispatch(delItemAdmin(id))
|
|
|
+ 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))
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
|
|
|
makeSure() {
|
|
|
const {type,id,title,tmpFolder,folderNameVal,text,fstName,spell,currId,deptId,folderId} = this.state
|
|
@@ -383,6 +396,14 @@ class PushContainer extends Component {
|
|
|
store.dispatch(setPageView(id))
|
|
|
}
|
|
|
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))
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
handleClose() {
|