Selaa lähdekoodia

人员添加bug修复

guoqing 1 vuosi sitten
vanhempi
commit
9dc069b238
1 muutettua tiedostoa jossa 8 lisäystä ja 7 poistoa
  1. 8 7
      src/views/placeManage/placePerson/placePersonAdd.vue

+ 8 - 7
src/views/placeManage/placePerson/placePersonAdd.vue

@@ -91,7 +91,7 @@
             input-align="right" />
         </van-cell-group>
         <van-cell-group>
-          <van-field v-model="locationName" readonly label="所属场所:" placeholder="请选择所属场所" input-align="right"
+          <van-field v-model="locationName" readonly required label="所属场所:" placeholder="请选择所属场所" input-align="right"
             right-icon="arrow-down" @click="hs_site = true">
           </van-field>
           <van-dialog v-model:show="hs_site" title="所属场所" show-cancel-button>
@@ -577,13 +577,13 @@ export default {
           .map((option) => option.name)
           .join("/"),
         currentResidenceId: selectedOptions
-          .map((option) => option.code)
+          .map((option) => option.id)
           .join("/"),
-        currentResidenceLevel2: selectedOptions[1] ? selectedOptions[1].code : "",
-        currentResidenceLevel3: selectedOptions[2] ? selectedOptions[2].code : "",
-        currentResidenceLevel4: selectedOptions[3] ? selectedOptions[3].code : "",
-        currentResidenceLevel5: selectedOptions[4] ? selectedOptions[4].code : "",
-        currentResidenceLevel6: selectedOptions[5] ? selectedOptions[5].code : "",
+        currentResidenceLevel2: selectedOptions[1] ? selectedOptions[1].id : "",
+        currentResidenceLevel3: selectedOptions[2] ? selectedOptions[2].id : "",
+        currentResidenceLevel4: selectedOptions[3] ? selectedOptions[3].id : "",
+        currentResidenceLevel5: selectedOptions[4] ? selectedOptions[4].id : "",
+        currentResidenceLevel6: selectedOptions[5] ? selectedOptions[5].id : "",
       });
       inputForm.value = json;
     };
@@ -728,6 +728,7 @@ export default {
     let router = useRouter();
     //数据提交
     const submit = () => {
+      console.log(inputForm.value,'========================>>>>>>>>>');
       //保存前附件处理
       inputForm.value.workPicture = fileImg.value
         .map((option) => option.id)