Эх сурвалжийг харах

人员档案搜索修改以及牌位管理返回问题修改

guoqing 2 жил өмнө
parent
commit
14f3aa575e

+ 25 - 11
src/views/placeManage/placePerson/placePerson.vue

@@ -28,7 +28,7 @@
         </van-search>
       </van-tab>
     </van-tabs>
-    <div class="PersonList" v-if="value1 == '' && value2 == ''">
+    <div class="PersonList">
       <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
         <van-list
           v-model:loading="loading"
@@ -89,7 +89,7 @@
         </van-list>
       </van-pull-refresh>
     </div>
-    <div class="PersonList" v-if="value1 != '' || value2 != ''">
+    <div class="PersonList" v-if="show == true">
       <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
         <van-list
           v-model:loading="loading"
@@ -175,6 +175,7 @@ export default {
       nativePlace: "",
       currentResidence: "",
     });
+    const show = ref(false)
     // 导航栏颜色
     const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
     let PersonList = ref([]);
@@ -195,6 +196,7 @@ export default {
         })
         .then(({ records, pages }) => {
           dataList.value = dataList.value.concat(records);
+          console.log(dataList.value);
           // 加载状态结束
           loading.value = false;
           if (index + 1 >= pages) {
@@ -228,9 +230,12 @@ export default {
     //搜索选择
     const value1 = ref("");
     const value2 = ref("");
+    const loading1 = ref(false);
+    const finished1 = ref(false);
+    let index1 = 0;
     const search1 = () => {
-      loading.value = true;
-      finished.value = false;
+      loading1.value = true;
+      finished1.value = false;
       new UserManage()
         .list({
           current: 1,
@@ -240,11 +245,11 @@ export default {
         .then(({ records, pages }) => {
           PersonList.value = PersonList.value.concat(records);
           // 加载状态结束
-          loading.value = false;
-          if (index + 1 >= pages) {
-            finished.value = true;
+          loading1.value = false;
+          if (index1 + 1 >= pages) {
+            finished1.value = true;
           }
-          index++;
+          index1++;
         });
     };
     const search2 = () => {
@@ -252,10 +257,16 @@ export default {
         .list({
           current: 1,
           size: 10000,
-          idcard: value2.value,
+          idNumber: value2.value,
         })
-        .then((res) => {
-          PersonList.value = res.records;
+        .then(({ records, pages }) => {
+          PersonList.value = PersonList.value.concat(records);
+          // 加载状态结束
+          loading1.value = false;
+          if (index1 + 1 >= pages) {
+            finished1.value = true;
+          }
+          index1++;
         });
     };
     //返回
@@ -272,6 +283,8 @@ export default {
       search2,
       loading,
       finished,
+      loading1,
+      finished1,
       refreshing,
       onLoad,
       onRefresh,
@@ -280,6 +293,7 @@ export default {
       dataList,
       selectColor,
       onClickright,
+      show
     };
   },
 };

+ 2 - 2
src/views/placeManage/placePerson/placePersonAdd.vue

@@ -32,7 +32,7 @@
       </van-cell-group>
       <van-cell-group>
         <van-field
-          v-model="inputForm.idNumber"
+          v-model="inputForm.idcard"
           center
           required
           label="证件号码:"
@@ -688,7 +688,7 @@ export default {
       name: "",
       sex: "",
       idType: "",
-      idNumber: "",
+      idcard: "",
       phone: "",
       location: {
         id: "",

+ 0 - 9
src/views/placeManage/placeTablet/placeTabletAdd.vue

@@ -254,15 +254,6 @@ export default {
       information: "",
     });
     onMounted(() => {
-      //民族字段接口
-      new placePerson().nation().then((res) => {
-        res.forEach((item) => {
-          nation.value.push({
-            text: item.label,
-            value: item.value,
-          });
-        });
-      });
       //籍贯接口
       new placePerson().nativePlace().then((res) => {
         nativePlace.value.push(...res);