فهرست منبع

Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

zhangxc 6 سال پیش
والد
کامیت
499327ab22

+ 4 - 2
src/common/js/func.js

@@ -102,6 +102,7 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
     cNum = i;
     value = it.value||'';
     textLabel = !ifEmpty&&i==0?Object.assign({},JSON.parse(config.textLabel),{showInCheck:true}):JSON.parse(config.textLabel);
+    //n个显示的标签最后一个标签后面要落关标,所以+1
     _textLabel = !ifEmpty&&cNum<config.showCheckNum+1?Object.assign({},JSON.parse(config._textLabel),{showInCheck:true}):JSON.parse(config._textLabel);
     if(i===0){
       //第一个标签不是文本标签时在前面添加文本标签
@@ -119,7 +120,7 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
       }
       saveText.push(tempText);
       // 模板只有一个标签时第一项后面也要加空标签
-      if(arr.length==1){
+      if(arr.length==1&&notText){
         newArr.push(textLabel);
         saveText.push('');
       }
@@ -155,7 +156,8 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
       }
       if(notText&&!noEnd&&i===arr.length-1){//最后一个非文本标签,后面添加一个文本标签
         //不能用上面的变量textLabel,因为上一个if可能也进了,这样就是同一个对象,值改变时会同步
-        newArr.push(ifEmpty?textLabel:_textLabel);
+        const _text = arr.length>config.showCheckNum?JSON.parse(config._textLabel):_textLabel;
+        newArr.push(ifEmpty?textLabel:_text);
         saveText.push("");
       }
     }

+ 2 - 0
src/components/AddInspect/SlideExcel/index.less

@@ -113,6 +113,7 @@
         td {
             text-align: left;
             padding-top: 6px;
+            cursor: default;
         }
         .excelUnit {
             width: auto;
@@ -157,6 +158,7 @@
   left: 50%;
   margin-left: -8px;
   display: none;
+  cursor: pointer;
 }
 .imgInfo:hover {
   background: url('../img/info3.png') no-repeat center center;

+ 4 - 1
src/components/AddInspect/SlideSelect/index.less

@@ -83,7 +83,8 @@
         height: 18px;
         width: 100%;
         td {
-            padding-top: 3px;
+          cursor: default;
+          padding-top: 3px;
         }
     }
 }
@@ -130,6 +131,7 @@
             td {
                 text-align: left;
                 padding-top: 6px;
+                cursor: default;
             }
             .excelUnit {
                 width: auto;
@@ -175,6 +177,7 @@
   left: 50%;
   margin-left: -8px;
   display: none;
+  cursor: pointer;
 }
 .imgInfo:hover {
   background: url('../img/info3.png') no-repeat center center;

+ 19 - 17
src/components/AddInspect/index.jsx

@@ -206,23 +206,25 @@ class Inspect extends React.Component {
             return (
               <li className={`${styles.itemPart} ${fillActive.details.length > 1 ? '' : styles.itemPartOne}`}>
                 <span className={styles.itemPartL}>{item.name}</span>
-                <select className={styles.itemPartR} onChange={(e) => {
-                  if (e.target.value == '请选择') {
-                    this.changeActivePart(idx, '')
-                    return;
-                  }
-                  this.changeActivePart(idx, e.target.value);
-                }}
-                >
-                  <option value="请选择">请选择</option>
-                  {
-                    (item.questionDetailList).map((val) => {
-                      return <option value={val.name}
-                        selected={val.name == item.value ? true : false}
-                      >{val.name}</option>
-                    })
-                  }
-                </select>
+                <span className={styles.itemPartT}>
+                  <select className={styles.itemPartR} onChange={(e) => {
+                    if (e.target.value == '请选择') {
+                      this.changeActivePart(idx, '')
+                      return;
+                    }
+                    this.changeActivePart(idx, e.target.value);
+                  }}
+                  >
+                    <option value="请选择">请选择</option>
+                    {
+                      (item.questionDetailList).map((val) => {
+                        return <option value={val.name}
+                          selected={val.name == item.value ? true : false}
+                        >{val.name}</option>
+                      })
+                    }
+                  </select>
+                </span>
               </li>
             )
           } else if (item.controlType == 6) {

+ 2 - 1
src/components/AddInspect/index.less

@@ -147,7 +147,8 @@
     .itemPartR {
         width: 62px;
         outline: none;
-        float: right;
+        float: left;
+        margin-top: 5px;
     }
     .itemPartT {
         float: right;