1178232204@qq.com 3 năm trước cách đây
mục cha
commit
f7470e9006
1 tập tin đã thay đổi với 6 bổ sung8 xóa
  1. 6 8
      src/components/cdssManage/hospital/AddHospital.vue

+ 6 - 8
src/components/cdssManage/hospital/AddHospital.vue

@@ -32,7 +32,7 @@
               <el-input v-model="form.hospitalCode" placeholder="4-15位,可输入字母、数字和下划线"></el-input>
             </el-form-item>-->
             <el-form-item label="医院地址">
-              <el-input v-model="form.address" placeholder="请输入医院地址" maxlength='100'></el-input>
+              <el-input v-model="form.address" placeholder="请输入医院地址" maxlength="100"></el-input>
             </el-form-item>
             <p
               style="text-align: center;padding-bottom: 14px;width: 100%;font-size:16px;font-weight: bold;"
@@ -278,8 +278,6 @@ export default {
               let errorCurrentList = [];
               this.getIndex(data.errorOther, errorOtherList);
               this.getIndex(data.errorCurrent, errorCurrentList);
-              console.log(errorOtherList);
-              console.log(errorCurrentList);
               errorOtherList.forEach(i => {
                 this.form.hospitalRelationVOList[i].errorOther = true;
               });
@@ -316,12 +314,12 @@ export default {
         delete it.errorOther;
         delete it.errorCurrent;
       });
-      let arr2Map = {};
-      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)
-        }
+        data.forEach((it, i) => {
+          if (item.name == it.name && item.code == it.code) {
+            list.push(index);
+          }
+        });
       });
     },
     // 处理拼音转换