Procházet zdrojové kódy

Merge branch 'groupTypeStyle' of http://223.93.170.82:10080/zhouna/newICSS into groupTypeStyle

luolei před 5 roky
rodič
revize
6a7cd08b54

binární
src/common/images/folderDown.png


binární
src/common/images/folderDownSelect.png


binární
src/common/images/folderUp.png


binární
src/common/images/folderUpSelect.png


+ 5 - 4
src/components/FolderOrder/index.jsx

@@ -13,7 +13,7 @@ class FolderOrder extends React.Component {
         this.state = {
             folderModal:false,
             selectIndex: -1,
-            folderList: null
+            folderList: null,
         }
         this.textInput = React.createRef();
         this.orderFolder = this.orderFolder.bind(this)
@@ -136,7 +136,8 @@ class FolderOrder extends React.Component {
                     <div className={style.floderItem} onClick={(e)=>{tmpItm.templateInfo&&tmpItm.templateInfo.length>0 ?this.floderSlide(e,i) :''}}>
                         <img src={selectIndex == i?floderD:floderR} className={style.floderRD}/>
                         {tmpItm.name}({tmpItm.templateInfoCount})
-                        <img  class={style.orderIcon} src={i===0?diagDown:diagUp} alt="排序" onClick={this.orderFolder.bind(this, i)}/>
+                        <span class={`${i ===0 ? style.arrowDown : style.arrowUp}`} onClick={this.orderFolder.bind(this, i)}></span>
+                        {/* <img  class={style.orderIcon} src={i===0?diagDown:diagUp} alt="排序" onClick={this.orderFolder.bind(this, i)}/> */}
                         {/* <span className={`${style.floderPartAction}`} id="floderActionBtn" onClick={(e)=>{this.floderAction(e,i)}}>...</span> */}
                     </div>
                     {
@@ -144,8 +145,8 @@ class FolderOrder extends React.Component {
                            { tmpItm.templateInfo.map((templateItem, index) => {
                                return (<div class={style.templateItem}>
                                    {templateItem.name}
-                                   {/* <span class={style.arrow}>11</span> */}
-                                   <img class={style.orderIcon} src={index===0?diagDown:diagUp} alt="排序" onClick={this.orderTemplate.bind(this, i, index)}/>
+                                   <span class={`${index===0 ? style.arrowDown : style.arrowUp}`} onClick={this.orderTemplate.bind(this, i, index)}></span>
+                                   {/* <img class={style.orderIcon} src={index===0?diagDown:diagUp} alt="排序" onClick={this.orderTemplate.bind(this, i, index)}/> */}
                                </div>)
                             })}
                         </div>

+ 45 - 7
src/components/FolderOrder/index.less

@@ -111,7 +111,7 @@
         pointer-events: none;
     }
     .orderIcon{
-        width: 20px;
+        // width: 20px;
         position: absolute;
         top: 11px;
         right: 25px;
@@ -122,13 +122,51 @@
         line-height: 45px;
         padding: 0 40px 0 10px;;
     }
-    .templateItem:hover {
+    .arrowDown{
+        position: absolute;
+        top: 13px;
+        right: 25px;
+        display: inline-block;
+        width: 12px;
+        height: 17px;
+        background: url("../../common/images/folderDown.png") no-repeat center ;
+        background-size: 12px 17px;
+    }
+    .arrowUp{
+        position: absolute;
+        top: 13px;
+        right: 25px;
+        display: inline-block;
+        width: 12px;
+        height: 17px;
+        background: url("../../common/images/folderUp.png") no-repeat center ;
+        background-size: 12px 17px;
+    }
+    .floderItem:hover,.templateItem:hover {
         border: 1px solid #3B9ED0;
+        .arrowDown{
+            position: absolute;
+            top: 13px;
+            right: 25px;
+            display: inline-block;
+            width: 12px;
+            height: 17px;
+            background: url("../../common/images/folderDownSelect.png") no-repeat center ;
+            background-size: 12px 17px;
+        }
+        .arrowUp{
+            position: absolute;
+            top: 13px;
+            right: 25px;
+            display: inline-block;
+            width: 12px;
+            height: 17px;
+            background: url("../../common/images/folderUpSelect.png") no-repeat center ;
+            background-size: 12px 17px;
+        }
     }
-    // .arrow{
-    //     display: inline-block;
-    //     width: 15px;
-    //     height: 20px;
-    //     background: url("../../common/images/diagDown.png")no-repeat center;
+    // .floderItem:hover{
+    //     border: 1px solid #3B9ED0;
     // }
+    
 }

+ 3 - 4
src/components/PushContainer/index.jsx

@@ -441,7 +441,7 @@ class PushContainer extends Component {
     } else if(type == 5) {
       if(this.props.admin){
         store.dispatch(newFloder(floderName,folderId,'modify'))
-        store.dispatch(changeVisible(false))
+        // store.dispatch(changeVisible(false))
       }else{
       }
     }
@@ -452,10 +452,9 @@ class PushContainer extends Component {
       hasCalcIndex: false
     })
   }
-  whichTemp(tab,name){
-    console.log('tan',tab)
+  whichTemp(tab,name,hasSearch){
     if(tab!=2||!name){
-      if(tab == 1 && name) {
+      if(tab == 1 && name&&hasSearch) {
         this.templateSearch(name,1)
       } else {
         store.dispatch(initAdminItemList(1,true))

+ 7 - 8
src/components/TemplateItems/index.jsx

@@ -228,7 +228,6 @@ class TemplateItems extends React.Component {
                 msg:'还没有保存模板'
             })
         }
-        if(admin||selectTemp ===2)
         this.setState({
             hasSearch: true
         })
@@ -298,11 +297,11 @@ class TemplateItems extends React.Component {
         },0)
 
         this.props.whichTemp(num,val)
-        if(val){
-            this.setState({
-                hasSearch:true
-            })
-        }
+        // if(val){
+        //     this.setState({
+        //         hasSearch:true
+        //     })
+        // }
     }
     render() {
         const {selectTemp,whichTemp, checkItemsAdmin,handleAllCheckboxAdmin,handleMangerTemplateAdmin,allCheckShowAdmin,admin,adminItems,allCheckShow, handleMangerTemplate,handleClickGetMore, handleDelList, handleAllCheckbox, items,checkItems,current,hasMore,templateNormsSearchList } = this.props;
@@ -366,7 +365,7 @@ class TemplateItems extends React.Component {
                             {
                                 <div className={`${style.topBorder} clearfix`}>
                                     {
-                                        !allCheckShow&&<div className={`${style.personalTmp} ${selectTemp==1?style.personalTmpOwn:''} clearfix`} onClick={()=>whichTemp(1,(this.state.val).trim())}>
+                                        !allCheckShow&&<div className={`${style.personalTmp} ${selectTemp==1?style.personalTmpOwn:''} clearfix`} onClick={()=>whichTemp(1,(this.state.val).trim(),hasSearch)}>
                                             <span className={style.tip}>个人模板</span>
                                             <i></i>
                                             {
@@ -377,7 +376,7 @@ class TemplateItems extends React.Component {
                                     {
                                         !admin?!allCheckShowAdmin&&<div 
                                             className={`${style.personalTmp} ${style.personalTmpStatand} ${selectTemp==2?style.personalTmpOwn:''}`} 
-                                            onClick={()=>{this.whichTemp(2,(this.state.val).trim());allCheckShow&&handleMangerTemplate(2)}}
+                                            onClick={()=>{this.whichTemp(2,(this.state.val).trim(),hasSearch);allCheckShow&&handleMangerTemplate(2)}}
                                             >标准模板 {selectTemp==2&&<img src={tempTip} className={style.tempTip} alt="" onMouseEnter={this.showTipContent} onMouseLeave={this.showTipContent}/>}
                                             {
                                                 showTipContent&&<div className={style.tempTipContent}>

+ 2 - 1
src/store/async-actions/tabTemplate.js

@@ -13,7 +13,7 @@ import {
   changeTitleAdmin,
   floderListAdmin,
   folderModal,
-  setSearchTemplateNorms
+  setSearchTemplateNorms,
 } from '@store/actions/tabTemplate';
 import {DIAG_SHOW} from "@store/types/print";
 import Notify from '@commonComp/Notify';
@@ -253,6 +253,7 @@ export const newFloder = (name,id,type) => { //新建管理员文件夹
         dispatch(folderModal(false))
         dispatch(getFloderList())
         dispatch(getFloderListAll())
+        dispatch(changeVisible(false))
       } else {
         Notify.error(data.msg);
       }