Procházet zdrojové kódy

feat(digitalDoor): 新增数字门牌综合查询功能

- 添加综合查询页面,实现人员、房屋、企业等信息的查询
- 新增查询输入框和查询按钮,支持关键词搜索
- 优化数字门牌首页布局,增加导航项
- 调整扫码查询后的页面跳转方式
梦辉 před 1 týdnem
rodič
revize
2c41c01dba

+ 6 - 0
src/pages.json

@@ -288,6 +288,12 @@
           "style": {
             "navigationBarTitleText": "提醒详情"
           }
+        },
+        {
+          "path": "pages/digitalDoor/generalInquiry/index",
+          "style": {
+            "navigationBarTitleText": "综合查询"
+          }
         }
       ]
     }

+ 82 - 3
src/pages/digitalDoorIndex/index.vue

@@ -1,13 +1,92 @@
 <script>
+import TemplateImg from "@/static/images/digitalDoor/composite.png";
+import PersonImg from "@/static/images/digitalDoor/person.png";
+import HouseImg from "@/static/images/digitalDoor/house.png"
+import InterestImg from "@/static/images/digitalDoor/interest.png"
+import EnterPromise from "@/static/images/digitalDoor/enterprise.png"
 
+export default {
+  data() {
+    return {
+      list: [
+        {
+          text: '综合查询',
+          icon: TemplateImg,
+          url:'/subPages/pages/digitalDoor/generalInquiry/index'
+        },
+        {
+          text: '人员管理',
+          icon: PersonImg
+        },
+        {
+          text: '房屋管理',
+          icon: HouseImg
+        },
+        {
+          text: '企业管理',
+          icon: TemplateImg
+        },
+        {
+          text: '兴趣点管理',
+          icon: InterestImg
+        },
+        {
+          text: '企业承诺',
+          icon: EnterPromise,
+          url: '/pages/home/home'
+        }
+      ]
+    }
+  },
+  methods: {
+    handleClick(item) {
+      console.log(item)
+      uni.navigateTo({
+        url: item.url
+      })
+    }
+  }
+}
 </script>
 
 <template>
-<view>
-测试
-</view>
+  <view>
+    <van-list class="list">
+      <van-cell v-for="item in list" :key="item.text">
+        <template>
+          <view class="text-group" @click="handleClick(item)">
+            <img :src="item.icon" alt="">
+            <view class="text-overflow">{{ item.text }}</view>
+          </view>
+        </template>
+      </van-cell>
+    </van-list>
+  </view>
 </template>
 
 <style scoped lang="scss">
+.list {
+  padding: 30rpx 30rpx;
+  border-radius: 20px;
+  border: 1px solid #eee;
+}
 
+.text-group {
+  display: flex;
+  align-items: center;
+  padding: 10rpx 0;
+
+  img {
+    width: 20px;
+    height: 20px;
+    margin-right: 20rpx;
+  }
+}
+
+.text-overflow {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: inline-block;
+  white-space: nowrap;
+}
 </style>

+ 79 - 0
src/subPages/pages/digitalDoor/generalInquiry/index.vue

@@ -0,0 +1,79 @@
+<script>
+export default {
+  data() {
+    return {
+      searchKey: ''
+    }
+  },
+  methods: {
+    search() {
+      uni.navigateTo({
+        url: '/pages/search/search?searchKey=' + this.searchKey
+      })
+    }
+  }
+}
+</script>
+
+<template>
+  <view class="box">
+    <view class="content">
+      <van-field
+          style="border-radius: 5px 0 0 5px;width: 80%;height: 50px"
+          v-model="searchKey"
+          center
+          clearable
+          placeholder="请输入内容"
+      >
+      </van-field>
+      <van-button style="width: 20%;border-radius: 0 5px 5px 0" type="primary" size="large" color="#198bfe" @click="search">查询</van-button>
+    </view>
+    <view class="desc">
+      <view class="title">说明:</view>
+      <view class="desc-content">
+        <view>1. 请先勾选查询范围进行缓存查询,未勾选则无法查询选定范围的数据。</view>
+        <view>
+          2. 综合查询仅部分信息字段中支持查询(人员的查询范围为姓名、身份证号、联系方式、户籍地、居住地;
+          房屋的查询范围为产权证号、房屋地址;
+          企业的查询范围为企业名称、招牌名称、统一社会信用代码、企业注册地地址、法人代表。)
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<style scoped lang="scss">
+.box {
+  height: 100vh;
+  display: flex;
+  flex-direction: column;
+
+  .content {
+    box-sizing: border-box;
+    padding: 10px;
+    flex: 1;
+    display: flex;
+    flex-wrap: wrap;
+    align-content: center;
+    justify-content: center;
+  }
+}
+
+.desc {
+  height: 300px;
+  padding: 16px;
+  color: #666;
+}
+
+.title {
+  font-size: 16px;
+  font-weight: bold;
+  margin-bottom: 8px;
+}
+
+.desc-content {
+  font-size: 12px;
+  line-height: 1.5;
+  color: #333;
+}
+</style>

+ 1 - 1
src/subPages/pages/scanCode/searchDoorplate.vue

@@ -91,7 +91,7 @@ export default {
 				Type: doorplateType,
 				code: val.code
 			};
-			uni.switchTab({
+			uni.navigateTo({
               url: '/pages/home/home'
             });
 		}