wzh преди 7 месеца
родител
ревизия
d774973b70
променени са 6 файла, в които са добавени 8823 реда и са изтрити 7 реда
  1. 13 0
      pages.json
  2. 4878 0
      pages/device/detail_new_20250528.vue
  3. 6 0
      pages/device/index.vue
  4. 3882 0
      pages/device/setting.vue
  5. 38 7
      pages/user/index.vue
  6. 6 0
      pages/work/index.vue

+ 13 - 0
pages.json

@@ -119,6 +119,19 @@
         "navigationStyle": "custom"
       }
     },
+    {
+      "path": "pages/device/detail_new_20250528",
+      "style": {
+        "navigationBarTitleText": "详情",
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      "path": "pages/device/setting",
+      "style": {
+        "navigationBarTitleText": "设置"
+      }
+    },
     {
       "path": "pages/wifi/index",
       "style": {

Файловите разлики са ограничени, защото са твърде много
+ 4878 - 0
pages/device/detail_new_20250528.vue


+ 6 - 0
pages/device/index.vue

@@ -82,6 +82,12 @@ export default {
   methods:{
     goDeviceDetail(item){
       let type = item.type;
+      if(type == 23){
+        uni.navigateTo({
+          url: '/pages/device/detail_new_20250528?id='+item.deviceId
+        });
+        return;
+      }
       if(type == 16 || type == 17 || type == 18 || type == 19){
         uni.navigateTo({
           url: '/pages/device/detail_6?id='+item.deviceId

Файловите разлики са ограничени, защото са твърде много
+ 3882 - 0
pages/device/setting.vue


+ 38 - 7
pages/user/index.vue

@@ -4,8 +4,11 @@
 			<u-search placeholder="请输入客户名称" :clearabled="true" @clear="searchDept" @custom="searchDept"
 				v-model="search.deptName" @search="searchDept"></u-search>
 		</view>
-		<view style="margin-top: 10px">
-			<uni-card v-if="item.parentId !==0" v-for="item in deptList" :title="item.deptName"
+		<scroll-view
+      scroll-y
+      style="height: 100vh"
+      @scrolltolower="loadMore">
+			<uni-card v-if="item.parentId !==0" v-for="item in displayList" :title="item.deptName"
 				:extra="item.createTime">
 
 				<view style="position: relative">
@@ -14,7 +17,7 @@
 					<view style="width: 50px;position: absolute;right:-10px;bottom:0px"><u-button @click="toUser(item)"
 							type="primary" :plain="true" size="mini" text="查看人员"></u-button>
 					</view>
-					
+
 					<view style="width: 50px;position: absolute;right:90rpx;bottom:0rpx"><u-button type="success"
 							@click="toDeviceList(item)" :plain="true" size="mini" text="查看设备"></u-button>
 					</view>
@@ -24,7 +27,9 @@
 				</view>
 
 			</uni-card>
-		</view>
+      <view v-if="loading" class="loading">加载中...</view>
+      <view v-if="allLoaded" class="no-more">没有更多了</view>
+    </scroll-view>
 		<view style="position: fixed;bottom: 0px;text-align: center;width: 100%">
 			<u-button type="primary" text="新增客户" @click="newUser"></u-button>
 		</view>
@@ -89,7 +94,12 @@
 		data() {
 			return {
 				deptList: [],
-				search: {
+        displayList:[],
+        loading:false,
+        allLoaded :false,
+        pageSize:50,
+        currentPage:1,
+        search: {
 					deptName: ""
 				},
 				statusList: [{
@@ -163,10 +173,31 @@
 				  }
 				});
 			},
+      loadMore() {
+        if (this.loading || this.allLoaded) return
+
+        this.loading = true
+        setTimeout(() => {
+          const start = this.currentPage * this.pageSize
+          const end = start + this.pageSize
+          const nextPageData = this.deptList.slice(start, end)
+
+          if (nextPageData.length === 0) {
+            this.allLoaded = true
+          } else {
+            this.displayList = this.displayList.concat(nextPageData)
+            this.currentPage++
+          }
+
+          this.loading = false
+        }, 300) // 模拟加载时间,实际可以去掉
+      },
 			getDeptList() {
 				getDeptList(this.search.deptName).then(res => {
 					this.deptList = res.data;
-				});
+          this.displayList = this.deptList.slice(0, 50)
+
+        });
 			},
 			doAddUser() {
 				let self = this;
@@ -282,4 +313,4 @@
 			width: 100%;
 		}
 	}
-</style>
+</style>

+ 6 - 0
pages/work/index.vue

@@ -235,6 +235,12 @@ export default {
 
               if(device != null){
                 let type =device.type;
+                if(type == 23){
+                  uni.navigateTo({
+                    url: '/pages/device/detail_new_20250528?id='+device.deviceId
+                  });
+                  return;
+                }
                 if(type == 16 || type == 17 || type == 18 || type == 19){
                   uni.navigateTo({
                     url: '/pages/device/detail_6?id='+device.deviceId