فهرست منبع

Merge remote-tracking branch 'HS_MZAP/master'

yin_yu820 1 سال پیش
والد
کامیت
2b9aec57ad
2فایلهای تغییر یافته به همراه16 افزوده شده و 140 حذف شده
  1. 16 139
      src/views/placeManage/placePerson/placePerson.vue
  2. 0 1
      src/views/placeManage/placePerson/placePersoninfo.vue

+ 16 - 139
src/views/placeManage/placePerson/placePerson.vue

@@ -13,22 +13,17 @@
   </van-nav-bar>
   <div class="main">
     <van-tabs v-model:active="active">
-      <van-tab title="姓名查询">
-        <van-search v-model="value1" show-action placeholder="请输入姓名">
-          <template #action>
-            <div @click="searchSelset">搜索</div>
-          </template>
-        </van-search>
+      <van-tab title="姓名查询" name="name">
       </van-tab>
-      <van-tab title="身份证查询">
-        <van-search v-model="value2" show-action placeholder="请输入身份证号">
+      <van-tab title="身份证查询" name="cardId">
+      </van-tab>
+    </van-tabs>
+    <van-search v-model="value1" show-action placeholder="请输入关键词">
           <template #action>
-            <div @click="searchSelset">搜索</div>
+            <div @click="search1">搜索</div>
           </template>
         </van-search>
-      </van-tab>
-    </van-tabs>
-    <div class="PersonList" v-if="show == false">
+    <div class="PersonList">
       <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
         <van-list
           v-model:loading="loading"
@@ -89,67 +84,6 @@
         </van-list>
       </van-pull-refresh>
     </div>
-    <div class="PersonList" v-if="show == true">
-      <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
-        <van-list
-          v-model:loading="loading"
-          :finished="finished"
-          finished-text="没有更多了"
-          @load="onLoad"
-        >
-          <van-swipe-cell v-for="item in PersonList" :key="item">
-            <div class="PersonItem" @click="goPlacePersonInfo(item.id)">
-              <van-row>
-                <van-col span="18">
-                  <p>
-                    {{ item.name }}(<span style="color: #36a7f3">{{
-                      item.idcard
-                    }}</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
-                  >
-                </van-col>
-              </van-row>
-              <van-row>
-                <van-col span="18">
-                  <span style="color: #a2a2a2" v-if="item.locationName">{{
-                    item.locationName
-                  }}</span>
-                </van-col>
-                <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>
-            </div>
-          </van-swipe-cell>
-        </van-list>
-      </van-pull-refresh>
-    </div>
   </div>
 </template>
 
@@ -175,10 +109,9 @@ export default {
       nativePlace: "",
       currentResidence: "",
     });
-    const show = ref(false)
+    const active = ref("name");
     // 导航栏颜色
     const selectColor = ref(window.localStorage.getItem("MZ_COLOR"));
-    let PersonList = ref([]);
     let dataList = ref([]);
     //数据获取
     const loading = ref(false);
@@ -186,7 +119,6 @@ export default {
     const refreshing = ref(false);
     let index = 0;
     const onLoad = () => {
-      show.value = false;
       loading.value = true;
       finished.value = false;
       new UserManage()
@@ -197,7 +129,6 @@ export default {
         })
         .then(({ records, pages }) => {
           dataList.value = dataList.value.concat(records);
-          console.log(dataList.value);
           // 加载状态结束
           loading.value = false;
           if (index + 1 >= pages) {
@@ -230,65 +161,15 @@ export default {
     };
     //搜索选择
     const value1 = ref("");
-    const value2 = ref("");
-    const loading1 = ref(false);
-    const finished1 = ref(false);
-    let index1 = 0;
     const search1 = () => {
-      show.value = true
-      loading1.value = true;
-      finished1.value = false;
-      new UserManage()
-        .list({
-          current: 1,
-          size: 10000,
-          name: value1.value,
-        })
-        .then(({ records, pages }) => {
-          PersonList.value = PersonList.value.concat(records);
-          // 加载状态结束
-          loading1.value = false;
-          if (index1 + 1 >= pages) {
-            finished1.value = true;
-          }
-          index1++;
-        });
-    };
-    const searchSelset = ()=>{
-      if(value1.value!=''){
-        PersonList.value = [];
-        search1()
+      if(active.value == "name"){
+        searchForm.value.name = value1.value
       }else{
-        dataList.value = []
-        onLoad()
+        searchForm.value.idcard = value1.value
       }
-      if(value2.value!=''){
-        PersonList.value = [];
-        search2()
-      }else{
-        dataList.value = []
-        onLoad()
-      }
-    }
-    const search2 = () => {
-      show.value = true
-      loading1.value = true;
-      finished1.value = false;
-      new UserManage()
-        .list({
-          current: 1,
-          size: 10000,
-          idNumber: value2.value,
-        })
-        .then(({ records, pages }) => {
-          PersonList.value = PersonList.value.concat(records);
-          // 加载状态结束
-          loading1.value = false;
-          if (index1 + 1 >= pages) {
-            finished1.value = true;
-          }
-          index1++;
-        });
+      dataList.value = [];
+      loading.value = true;
+      onLoad()
     };
     //返回
     const onClickLeft = () => {
@@ -296,24 +177,20 @@ export default {
     };
     return {
       onClickLeft,
+      active,
       searchForm,
       //搜索
       value1,
-      value2,
       loading,
       finished,
-      loading1,
-      finished1,
       refreshing,
       onLoad,
       onRefresh,
       goPlacePersonInfo,
-      PersonList,
       dataList,
       selectColor,
       onClickright,
-      show,
-      searchSelset
+      search1
     };
   },
 };

+ 0 - 1
src/views/placeManage/placePerson/placePersoninfo.vue

@@ -1016,7 +1016,6 @@ export default {
       changePersonnelType();
     };
     const changePersonnelType = () => {
-      console.log(data.value.personnelType,'========================>data.value.personnelType');
       let userManagenmetDetailsDTOList = [];
       new placePerson()
         .userDTOqueryId(data.value.personnelType.toString())