LuChongMei преди 1 година
родител
ревизия
bab1881ad9
променени са 1 файла, в които са добавени 33 реда и са изтрити 42 реда
  1. 33 42
      src/views/placeManage/placePerson/placePerson.vue

+ 33 - 42
src/views/placeManage/placePerson/placePerson.vue

@@ -1,12 +1,6 @@
 <template>
-  <van-nav-bar
-    fixed
-    title="人员档案管理"
-    left-arrow
-    @click-left="onClickLeft"
-    @click-right="onClickright"
-    :style="{ 'background-color': selectColor }"
-  >
+  <van-nav-bar fixed title="人员档案管理" left-arrow @click-left="onClickLeft" @click-right="onClickright"
+    :style="{ 'background-color': selectColor }">
     <template #right>
       <van-icon name="plus" size="18" />
     </template>
@@ -19,18 +13,13 @@
       </van-tab>
     </van-tabs>
     <van-search v-model="value1" show-action placeholder="请输入关键词">
-          <template #action>
-            <div @click="search1">搜索</div>
-          </template>
-        </van-search>
+      <template #action>
+        <div @click="search1">搜索</div>
+      </template>
+    </van-search>
     <div class="PersonList">
       <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
-        <van-list
-          v-model:loading="loading"
-          :finished="finished"
-          finished-text="没有更多了"
-          @load="onLoad"
-        >
+        <van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
           <van-swipe-cell v-for="item in dataList" :key="item">
             <div class="PersonItem" @click="goPlacePersonInfo(item.id)">
               <van-row>
@@ -38,26 +27,15 @@
                   <p>
                     {{ item.name }}(<span style="color: #36a7f3">{{
                       item.idcard
-                    }}</span
-                    >)
+                    }}</span>)
                   </p>
                 </van-col>
                 <van-col span="6" style="text-align: right">
-                  <span v-if="item.religion == 1" style="color: #25bc5c"
-                    >伊斯兰教</span
-                  >
-                  <span v-if="item.religion == 2" style="color: #53b4f4"
-                    >基督教</span
-                  >
-                  <span v-if="item.religion == 3" style="color: #36a7f3"
-                    >天主教</span
-                  >
-                  <span v-if="item.religion == 4" style="color: #d7cc18"
-                    >佛教</span
-                  >
-                  <span v-if="item.religion == 5" style="color: #36a7f3"
-                    >道教</span
-                  >
+                  <span v-if="item.religion == 1" style="color: #25bc5c">伊斯兰教</span>
+                  <span v-if="item.religion == 2" style="color: #53b4f4">基督教</span>
+                  <span v-if="item.religion == 3" style="color: #36a7f3">天主教</span>
+                  <span v-if="item.religion == 4" style="color: #d7cc18">佛教</span>
+                  <span v-if="item.religion == 5" style="color: #36a7f3">道教</span>
                 </van-col>
               </van-row>
               <van-row>
@@ -66,16 +44,13 @@
                     item.locationName
                   }}</span>
                 </van-col>
-                <van-col
-                  span="6"
-                  style="
+                <van-col span="6" style="
                     text-align: right;
                     font-size: 12px;
                     white-space: nowrap;
                     overflow: hidden;
                     text-overflow: ellipsis;
-                  "
-                >
+                  ">
                   <span>{{ item.personnelTypeName }}</span>
                 </van-col>
               </van-row>
@@ -144,6 +119,7 @@ export default {
       // 重新加载数据
       // 将 loading 设置为 true,表示处于加载状态
       loading.value = true;
+
       onLoad();
     };
     //跳转
@@ -162,13 +138,15 @@ export default {
     //搜索选择
     const value1 = ref("");
     const search1 = () => {
-      if(active.value == "name"){
+      if (active.value == "name") {
         searchForm.value.name = value1.value
-      }else{
+      } else {
         searchForm.value.idcard = value1.value
       }
       dataList.value = [];
       loading.value = true;
+      index = 0;
+      finished.value = false
       onLoad()
     };
     //返回
@@ -202,42 +180,53 @@ html {
   padding: 0;
   background-color: #f2f2f2;
 }
+
 .van-nav-bar {
   background-color: #36a7f3;
+
   .van-nav-bar__title {
     color: #fff;
   }
+
   .van-badge__wrapper {
     color: #fff;
   }
 }
+
 .search {
   background-color: #fff;
+
   .van-dropdown-menu__item {
     width: 20px;
     height: 50px;
   }
 }
+
 .PersonList {
   background-color: #fff;
+
   p {
     margin: 0;
     padding: 0;
   }
+
   .PersonItem {
     padding: 10px 10px;
     font-size: 16px;
     border-bottom: 1px solid #f2f2f2;
     overflow: hidden;
+
     .van-row {
       &:nth-child(1) {
         margin-bottom: 10px;
+
         .van-col {
           &:nth-child(1) {
             p {
               font-weight: 700;
             }
           }
+
           &:nth-child(2) {
             p {
               text-align: right;
@@ -245,6 +234,7 @@ html {
           }
         }
       }
+
       &:nth-child(2) {
         .van-col {
           &:nth-child(1) {
@@ -252,6 +242,7 @@ html {
               color: #d0d0d0;
             }
           }
+
           &:nth-child(2) {
             p {
               text-align: right;