Ver código fonte

文件夹重命名(3022)

zhangxc 5 anos atrás
pai
commit
e6cfbba1f9
1 arquivos alterados com 8 adições e 2 exclusões
  1. 8 2
      src/components/PushContainer/index.jsx

+ 8 - 2
src/components/PushContainer/index.jsx

@@ -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,clearSearchTemplateNorms,folderOrder } from '@store/actions/tabTemplate';
-import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList,delFloder,addTemplateQuote } from '@store/async-actions/tabTemplate';
+import { initItemList,initAdminItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin,getFloderList,delFloder,addTemplateQuote,newFloder } from '@store/async-actions/tabTemplate';
 import { connect } from "react-redux";
 import store from '@store';
 import { billing } from '@store/async-actions/pushMessage';
@@ -362,7 +362,7 @@ class PushContainer extends Component {
  
 
   makeSure() {
-    const {type,id,title,tmpFolder,folderNameVal,text,fstName,spell,currId,deptId,folderId} = this.state
+    const {type,id,title,tmpFolder,folderNameVal,text,fstName,spell,currId,deptId,folderId,floderName} = this.state
     if (type == 1) {
       if(this.props.admin){
         store.dispatch(delItemAdmin(id,folderId))
@@ -422,6 +422,12 @@ class PushContainer extends Component {
         // store.dispatch(delFloder(folderId))
         // store.dispatch(delBatchItem(this.props.checkItems))
       }
+    } else if(type == 5) {
+      if(this.props.admin){
+        store.dispatch(newFloder(floderName,folderId))
+        store.dispatch(changeVisible(false))
+      }else{
+      }
     }
   }
   handleClose() {