Sfoglia il codice sorgente

更改中文冒号,修改辅检div样式,添加搜索ie8兼

Luolei 6 anni fa
parent
commit
8433d68d90

+ 1 - 2
src/common/components/InspectCommon/index.less

@@ -8,9 +8,8 @@
     min-width: 300px;
     max-width: 600px;
     box-sizing: border-box;
-    box-shadow: 0 6px 20px 0 #989DA3;
     margin-bottom: 80px;
-    // border: 1px solid #989DA3;
+    .llStyle;
 }
 .btnWrap{
     span {

+ 20 - 27
src/common/components/SearchOption/index.jsx

@@ -46,9 +46,22 @@ class SearchOption extends React.Component {
         });
         handleChangeValue('');
     }
-
+    handleInput(e){
+      if((e.target.value).trim() != ''){
+          this.props.handleChangeValue(e.target.value);
+          this.setState({
+              val:e.target.value,
+              show:true
+          })
+      }else{
+          this.handleClearVal()
+          this.setState({
+              show:false
+          })
+      }
+    }
     render() {
-        const { handleChangeValue,children,visible } = this.props;
+        const { children,visible } = this.props;
         const { show } = this.state;
         return (
             <div id="searchOption" className={visible?`${styles.search} ${styles.show} searchOption`:`${styles.search} ${styles.hide} searchOption`}>
@@ -67,32 +80,12 @@ class SearchOption extends React.Component {
                         }
                     }}
                     onBlur={()=>{this.setState({border:false,val:''})}}
-                    onKeyUp={(e) => { 
-                        if((e.target.value).trim() != ''){
-                            handleChangeValue(e.target.value);
-                            this.setState({
-                                val:e.target.value,
-                                show:true
-                            })
-                        }else{
-                            this.setState({
-                                show:false
-                            })
-                        }
+                    onInput={(e) => { 
+                        this.handleInput(e)
+                    }}
+                    onPropertyChange={(e) => {  // 兼容ie
+                        this.handleInput(e)
                     }}
-                    // onPropertyChange={(e) => {  // 兼容ie
-                    //     if((e.target.value).trim() != ''){
-                    //         handleChangeValue(e.target.value);
-                    //         this.setState({
-                    //             val:e.target.value,
-                    //             show:true
-                    //         })
-                    //     }else{
-                    //         this.setState({
-                    //             show:false
-                    //         })
-                    //     }
-                    // }}
                     placeholder="搜索"
                 />
                 <div className={styles.autoList}>

+ 2 - 2
src/common/components/SearchOption/index.less

@@ -8,8 +8,8 @@
     top: 40px;
     z-index: 99;
     background-color: #fff;
-    box-shadow: 0 6px 20px 0 #989DA3;
     margin-bottom: 80px;
+    .llStyle;
     .autoList {
         max-height: 225px;
         min-height: 80px;
@@ -47,4 +47,4 @@
 }
 .hide {
     display: none;
-}
+}

+ 6 - 0
src/common/less/variables.less

@@ -154,4 +154,10 @@
 
 .hide{
   display: none!important;
+}
+
+.llStyle{
+  box-shadow: 0 10px 20px 0 #989DA3;
+  filter:progid:DXImageTransform.Microsoft.Shadow(color='#989DA3',Direction=125,Strength=6);
+  border: 1px solid #f3f0f0;
 }

+ 3 - 23
src/components/AddAssistCheck/index.jsx

@@ -109,26 +109,10 @@ class AddAssistCheck extends React.Component {
             {
                 assistLabel.map((item,idx) => {
                     return (<li key={item.id}> 
-                        <span style={{float:"left"}}>{item.name}:</span>
-                        <p style={{float:"none",overflow:"hidden",marginRight:"215px",paddingLeft:'8px'}}>
-                        {/* <p className={styles.textareaWrap}> */}
-                            {/* <textarea
-                                className={styles.divTextarea}
-                                onChange={(e)=>{
-                                    handleChangeAssistValue(e.target.value,idx,e)
-                                    if(e.target.value.trim() == '') {
-                                        e.target.style.height = '18px';
-                                        return;
-                                    }
-                                    e.target.style.height = e.targetv.scrollHeight+'px';
-                                }}
-                                value={item.value}
-                                // onFocus={(e)=>{e.target.style.height = e.target.scrollHeight+'px';}}
-                                onKeyUp={(e)=>{handleChangeAssistValue(e.target.value,idx,e)}} 
-                                placeholder="报告描述或意见"
-                            ></textarea> */}
+                        <span className={styles.assistName} style={{float:"left"}}>{item.name}:</span>
+                        <div className={styles.textareaWrap}>
                             <Textarea value={item.value} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
-                        </p>
+                        </div>
                         <div className={styles.pointerFinger}>
                             <p onClick={()=>this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
                             <i onClick={()=>this.handleShowDate(idx)}></i>
@@ -137,14 +121,10 @@ class AddAssistCheck extends React.Component {
                                 <Calendar isShow={true} handleChange={(info)=>{handleChangeDate(info,idx);this.setState({date:false})}}></Calendar>
                             </div>
                         </div>
-                        {/* <p className={styles.iptWrap}> */}
-                            {/* <input type="text" onChange={(e)=>{handleChangeAssistValue(e.target.value,idx)}} placeholder={"报告描述或意见"}/> */}
-                        {/* </p> */}
                     </li>)
                 })
             }
         </ul>
-        
     }
     render() {
         const { handleChangeValue, list } = this.props;

File diff suppressed because it is too large
+ 2 - 20
src/components/AddAssistCheck/index.less


+ 4 - 4
src/store/reducers/assistCheck.js

@@ -39,7 +39,7 @@ export default (state = initSearchList, action) => {
             }
         }
         for (let j = 0; j < tempArrs.length; j++) {
-            tmpString += (tempArrs[j].name+(tempArrs[j].value?(':'+tempArrs[j].value):'')+(tempArrs[j].time?',报告日期:'+tempArrs[j].time:'')+';')
+            tmpString += (tempArrs[j].name+(tempArrs[j].value?(':'+tempArrs[j].value):'')+(tempArrs[j].time?',报告日期:'+tempArrs[j].time:'')+';')
         }
         newState.dataString = tmpString
         return newState;
@@ -54,7 +54,7 @@ export default (state = initSearchList, action) => {
             return
         }
         for (let i = 0; i < tempArr.length; i++) {
-            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
+            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
         }
         newState.assistLabel = [...tempArr]
         newState.dataString = tmpString
@@ -69,7 +69,7 @@ export default (state = initSearchList, action) => {
                 tempArr[i].value = action.val
                 newState.assistLabel = [...tempArr]
             }
-            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
+            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
         }
         newState.dataString = tmpString
         return newState;
@@ -83,7 +83,7 @@ export default (state = initSearchList, action) => {
                 tempArr[i].time = action.date
                 newState.assistLabel = [...tempArr]
             }
-            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
+            tmpString += (tempArr[i].name+(tempArr[i].value?(':'+tempArr[i].value):'')+(tempArr[i].time?',报告日期:'+tempArr[i].time:'')+';')
         }
         newState.dataString = tmpString
         return newState;

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

@@ -22,7 +22,7 @@ const initState = {
   editClear:true,
 }
 
-export default function(state=initState,action){console.log(state)
+export default function(state=initState,action){
   const res = Object.assign({},state);
   switch (action.type){
     case SET_MAINSUIT://主诉模板