Browse Source

样式修改

1178232204@qq.com 3 năm trước cách đây
mục cha
commit
51f6a6fd68

+ 28 - 16
src/components/icss/sonhospital/SonHospital.vue

@@ -14,9 +14,9 @@
                 :height="form.hospitalRelationVOList.length > 0?'calc(100vh - 260px)':'60px'"
                 :height="form.hospitalRelationVOList.length > 0?'calc(100vh - 260px)':'60px'"
                 class="tabs"
                 class="tabs"
                 ref="tableList"
                 ref="tableList"
-                :header-row-style="{height:'40px',cursor: 'pointer'}"
-                :row-style="{height:'40px',cursor: 'pointer'}"
-                :header-cell-style="{height:'40px',borderColor:'#DCDFE6'}"
+                :header-row-style="{height:'40px',cursor: 'pointer',fontSize:'14px'}"
+                :row-style="{height:'40px',cursor: 'pointer',fontSize:'14px'}"
+                :header-cell-style="{height:'40px',borderColor:'#DCDFE6',fontSize:'14px'}"
               >
               >
                 <el-table-column label="序号" type="index" width="80">
                 <el-table-column label="序号" type="index" width="80">
                   <template slot="header" slot-scope="scope">
                   <template slot="header" slot-scope="scope">
@@ -95,12 +95,15 @@
                 </el-table-column>
                 </el-table-column>
               </el-table>
               </el-table>
               <div class="add" v-if="form.hospitalRelationVOList.length == 0">
               <div class="add" v-if="form.hospitalRelationVOList.length == 0">
-                <p class="add-border" @click="add">
-                </p>
+                <p class="add-border" @click="add"></p>
               </div>
               </div>
             </el-form-item>
             </el-form-item>
             <el-form-item>
             <el-form-item>
-              <el-button type="primary" @click="onSubmit" :disabled="saveDisable">确定</el-button>
+              <el-button
+                type="primary"
+                @click="onSubmit"
+                v-if="form.hospitalRelationVOList.length>0"
+              >确定</el-button>
             </el-form-item>
             </el-form-item>
           </el-form>
           </el-form>
         </el-col>
         </el-col>
@@ -198,7 +201,7 @@ export default {
             }
             }
             this.saveDisable = false;
             this.saveDisable = false;
           });
           });
-        }else {
+        } else {
           this.locateToErr();
           this.locateToErr();
           return false;
           return false;
         }
         }
@@ -211,10 +214,23 @@ export default {
       }, 0);
       }, 0);
     },
     },
     getIndex(data, list) {
     getIndex(data, list) {
+      let hospitalRelationVOList = JSON.parse(
+        JSON.stringify(this.form.hospitalRelationVOList)
+      );
+      hospitalRelationVOList.forEach(it => {
+        delete it.errorOther;
+        delete it.errorCurrent;
+      });
       let arr2Map = {};
       let arr2Map = {};
-      data.forEach((item, index) => (arr2Map[item.name] = item));
-      this.form.hospitalRelationVOList.forEach((item, index) => {
-        arr2Map[item.name] && list.push(index);
+      data.forEach((item, index) => (arr2Map[item] = item));
+      hospitalRelationVOList.forEach((item, index) => {
+        if (
+          arr2Map[item] &&
+          item.name == arr2Map[item].name &&
+          item.code == arr2Map[item].code
+        ) {
+          list.push(index);
+        }
       });
       });
     },
     },
 
 
@@ -372,6 +388,7 @@ export default {
   /deep/.el-input__inner {
   /deep/.el-input__inner {
     height: 32px;
     height: 32px;
     margin-bottom: 18px;
     margin-bottom: 18px;
+    font-size: 12px;
   }
   }
   /deep/ .is-error .el-form-item__error {
   /deep/ .is-error .el-form-item__error {
     top: 34px;
     top: 34px;
@@ -397,17 +414,12 @@ export default {
   border: 1px solid #ebeef5;
   border: 1px solid #ebeef5;
   border-top: none;
   border-top: none;
   .add-border {
   .add-border {
-    border: 1px #c9c9c9 dashed;
+    border: 1px #48c5d7 dashed;
     width: 96%;
     width: 96%;
     height: 30px;
     height: 30px;
     text-align: center;
     text-align: center;
     line-height: 30px;
     line-height: 30px;
     cursor: pointer;
     cursor: pointer;
-    background: url('../../../images/add-no.png') no-repeat center center;
-    background-size: 16px 16px;
-  }
-  .add-border:hover {
-    border-color: #48c5d7;
     background: url('../../../images/add-nob.png') no-repeat center center;
     background: url('../../../images/add-nob.png') no-repeat center center;
     background-size: 16px 16px;
     background-size: 16px 16px;
   }
   }