luolei 5 years ago
parent
commit
80fb7a5c99

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

@@ -15,6 +15,7 @@ import MedicalInfoContainer from '@containers/MedicalInfoContainer';
 import FolderName from '@components/FolderName';
 import slideDown from '@common/images/slideDown.png';
 import CaseQuailty from "../CaseQuailty";
+import $ from "jquery";
 
 class PushContainer extends Component {
   constructor(props) {
@@ -100,6 +101,7 @@ class PushContainer extends Component {
       // let searchVal = document.getElementById("searchTmp").value
       store.dispatch(initItemList(1,0));
       store.dispatch(getFloderListAll())
+      $(".floderSlideLis").eq(0).next().slideDown()
     }
     store.dispatch(tabChange(id))
   }

+ 6 - 2
src/components/TemplateItems/index.jsx

@@ -26,7 +26,7 @@ class TemplateItems extends React.Component {
             height:'',
             showTipContent:false,
             hasSearch: false,
-            showIndex: -1
+            showIndex: 0
         }
         this.$cont = React.createRef();
         this.$conts = React.createRef();
@@ -143,7 +143,7 @@ class TemplateItems extends React.Component {
             let tmpItm = items[i]
             Floder.push(
                 <div className={style.floderPart}>
-                    <div className={style.floderPartFl} onClick={(e)=>this.floderSlide(e,tmpItm,i)}>
+                    <div className={`${style.floderPartFl} floderSlideLis`} onClick={(e)=>this.floderSlide(e,tmpItm,i)}>
                         {admin&&<img src={showIndex== i?floderD:floderR} className={style.floderRD}/>}
                         {!admin&&<img src={tmpItm.slide == 1?floderD:floderR} className={style.floderRD}/>}
                         {tmpItm.name}({tmpItm.templateInfoCount})
@@ -287,6 +287,10 @@ class TemplateItems extends React.Component {
       }
     }
     whichTemp(num,val){
+        setTimeout(()=>{
+            $(".floderSlideLis").eq(0).next().slideDown()
+        },0)
+
         this.props.whichTemp(num,val)
         if(val){
             this.setState({

+ 1 - 1
src/store/reducers/tabTemplate.js

@@ -202,7 +202,7 @@ export default (state = initDataList, action) => {
   }
   if (action.type === INIT_ADMIN_ITEMS) {//标准模板数据
     const newState = Object.assign({}, state);
-    // action.state[0].slide=1
+    action.state[0].slide=1
     newState.adminItems = action.state
     let tmpLis = [];
     for(let k = 0;k < action.state.length;k++){