| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 | 
							- <template>
 
-   <oa-scroll
 
-     customClass="bg-white scroll-height"
 
-     :pageSize="pageSize"
 
-     :total="total"
 
-     :isSticky="false"
 
-     :refresherLoad="true"
 
-     :refresherLoadTitle="true"
 
-     :refresherEnabled="true"
 
-     :refresherDefaultStyle="'none'"
 
-     :refresherThreshold="44"
 
-     :refresherBackground="'#f5f6f7'"
 
-     @load="load"
 
-     @refresh="refresh"
 
-     :data-theme="'theme-' + proxy.$settingStore.themeColor.type"
 
-   >
 
-     <template #default>
 
-       <view class="deviceManage" style="border-top:1px solid rgba(0,0,0,.1)">
 
-         <u-grid :border="true" >
 
-           <u-grid-item v-for="(base, index) in dataList" :key="index" @click="handleToDevice(base.id, base.productName,base.deviceCount)">
 
-             <!-- <u-badge type="primary" max="9999" :value="base.deviceCount" :showZero="true" :absolute="true" :offset="[10, 10, 0, 0]"></u-badge> -->
 
-             <image class="mb15 mt35" style="width: 40px; height: 40px" :src="base.typeImg" mode="aspectFill"></image>
 
-             <view class="mb15 text-ellipsis" style="width: 100%; text-align: center">{{ base.productName }}</view>
 
-           </u-grid-item>
 
-         </u-grid>
 
-       </view>
 
-     </template>
 
-   </oa-scroll>
 
- </template>
 
- <script setup>
 
- import { onReady, onLoad, onShow, onNavigationBarButtonTap, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
 
- import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance } from "vue";
 
- import { useStores, commonStores } from "@/store/modules/index";
 
- import { dmpProductInfo } from "@/api/business/fireIot/deviceManage.js";
 
- const { proxy } = getCurrentInstance();
 
- const dataList = ref([]);
 
- const pageSize = ref(21);
 
- const current = ref(1);
 
- const total = ref(0);
 
- /**
 
-  * @页面初始化
 
-  */
 
- function init() {
 
-   dmpProductInfo({ productName: "", current: current.value, size: pageSize.value }).then((requset) => {
 
-     if (requset.status === "SUCCESS") {
 
-       requset.data.records.forEach((el) => {
 
-         if (!el.typeImg) {
 
-           el.typeImg = "/static/images/404.png";
 
-         }
 
-         if (el.deviceCount == null) {
 
-           el.deviceCount = 0;
 
-         }
 
-       });
 
-       dataList.value = requset.data.records;
 
-       total.value = requset.data.total;
 
-     }
 
-   });
 
- }
 
- function handleToDevice(id, productName,total) {
 
-   proxy.$tab.navigateTo(`/pages/business/fireIot/deviceManage/components/deviceDetailsList?id=${id}&productName=${productName}`);
 
- }
 
- /**
 
-  * @scrollView加载数据
 
-  */
 
- function load() {
 
-   pageSize.value += 10;
 
-   init();
 
- }
 
- /**
 
-  * @scrollView刷新数据
 
-  */
 
- function refresh() {
 
-   pageSize.value = 20;
 
-   init();
 
- }
 
- onShow(() => {
 
-   //调用系统主题颜色
 
-   proxy.$settingStore.systemThemeColor([1]);
 
-   init();
 
- });
 
- </script>
 
 
  |