|
@@ -1,99 +1,76 @@
|
|
|
<template>
|
|
|
- <oa-scroll customClass="bg-white scroll-height" :pageSize="pageSize" :total="total" :refresherLoad="true"
|
|
|
- :refresherLoadTitle="false" :refresherEnabled="true" :refresherDefaultStyle="'none'" :refresherThreshold="44"
|
|
|
- :refresherBackground="'#f5f6f7'" @load="load" @refresh="refresh"
|
|
|
- :data-theme="'theme-' + proxy.$settingStore.themeColor.type">
|
|
|
+ <oa-scroll
|
|
|
+ customClass="bg-white scroll-height"
|
|
|
+ :pageSize="pageSize"
|
|
|
+ :total="total"
|
|
|
+ :refresherLoad="true"
|
|
|
+ :refresherLoadTitle="false"
|
|
|
+ :refresherEnabled="true"
|
|
|
+ :refresherDefaultStyle="'none'"
|
|
|
+ :refresherThreshold="44"
|
|
|
+ :refresherBackground="'#f5f6f7'"
|
|
|
+ @load="load"
|
|
|
+ @refresh="refresh"
|
|
|
+ :data-theme="'theme-' + proxy.$settingStore.themeColor.type"
|
|
|
+ >
|
|
|
<template #default>
|
|
|
<view class="menu-list m0">
|
|
|
- <view class="list-cell list-cell-arrow" style=" line-height: 25px" v-for="(base, index) in dataList"
|
|
|
- :key="index" @click="handleToDetails(base.productCode, base.productName)">
|
|
|
+ <view class="list-cell list-cell-arrow" style="line-height: 25px" v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base.productCode, base.productName)">
|
|
|
<view class="menu-item">
|
|
|
- <image class="image-bg" style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0" :src="base.typeImg">
|
|
|
- </image>
|
|
|
+ <image class="image-bg" style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0" :src="base.typeImg"> </image>
|
|
|
<view style="width: calc(100% - 51px); display: flex; justify-content: space-between; padding-right: 10px">
|
|
|
<view class="deviceHeader">
|
|
|
<view class="deviceName text-ellipsis">{{ base.productName }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
</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, baseAlarmTypeList } from "@/api/business/fireIot/alarmManage.js";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
const dataList = ref([
|
|
|
{
|
|
|
-
|
|
|
- "productName": "人工督察单",
|
|
|
- "productCode": "501_JK",
|
|
|
- "deviceType": 501,
|
|
|
- "total": 819,
|
|
|
- "untreated": 26,
|
|
|
- "processed": 793,
|
|
|
- "processRate": 96.82539,
|
|
|
- "deviceCount": 661,
|
|
|
- "offLineUntreated": 0,
|
|
|
- "offLineProcessed": 0,
|
|
|
- "offLineProcessRate": 0,
|
|
|
- "typeImg": "/static/images/fireInspect/rg.png"
|
|
|
-
|
|
|
+ productName: "人工督察单",
|
|
|
+ productCode: "501_JK",
|
|
|
+ deviceType: 501,
|
|
|
+ total: 819,
|
|
|
+ untreated: 26,
|
|
|
+ processed: 793,
|
|
|
+ processRate: 96.82539,
|
|
|
+ deviceCount: 661,
|
|
|
+ offLineUntreated: 0,
|
|
|
+ offLineProcessed: 0,
|
|
|
+ offLineProcessRate: 0,
|
|
|
+ typeImg: "/static/images/fireInspect/rg.png",
|
|
|
},
|
|
|
{
|
|
|
- "productName": "电子督察单",
|
|
|
- "productCode": "509_HJ",
|
|
|
- "deviceType": 509,
|
|
|
- "total": 3,
|
|
|
- "untreated": 0,
|
|
|
- "processed": 3,
|
|
|
- "processRate": 100,
|
|
|
- "deviceCount": 1,
|
|
|
- "offLineUntreated": 0,
|
|
|
- "offLineProcessed": 0,
|
|
|
- "offLineProcessRate": 0,
|
|
|
- "typeImg": "/static/images/fireInspect/dz.png"
|
|
|
+ productName: "电子督察单",
|
|
|
+ productCode: "509_HJ",
|
|
|
+ deviceType: 509,
|
|
|
+ total: 3,
|
|
|
+ untreated: 0,
|
|
|
+ processed: 3,
|
|
|
+ processRate: 100,
|
|
|
+ deviceCount: 1,
|
|
|
+ offLineUntreated: 0,
|
|
|
+ offLineProcessed: 0,
|
|
|
+ offLineProcessRate: 0,
|
|
|
+ typeImg: "/static/images/fireInspect/dz.png",
|
|
|
},
|
|
|
]);
|
|
|
const pageSize = ref(20);
|
|
|
-const current = ref(1);
|
|
|
const total = ref(2);
|
|
|
|
|
|
-/**
|
|
|
- * @页面初始化
|
|
|
- */
|
|
|
-function init() {
|
|
|
- baseAlarmTypeList({ productName: "", current: current.value, size: pageSize.value }).then((requset) => {
|
|
|
- if (requset.status === "SUCCESS") {
|
|
|
- dmpProductInfo({ current: current.value, size: 2000 }).then((requset1) => {
|
|
|
- if (requset1.status === "SUCCESS") {
|
|
|
- requset.data.records.forEach((e) => {
|
|
|
- requset1.data.records.forEach((el) => {
|
|
|
- if (e.productCode === el.productCode) {
|
|
|
- e.typeImg = el.typeImg ? el.typeImg : "/static/images/404.png";
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
|
|
|
- // dataList.value = requset.data.records;
|
|
|
- total.value = requset.data.total;
|
|
|
- console.log(dataList.value)
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
|
|
|
function handleToDetails(productCode, productName) {
|
|
|
proxy.$tab.navigateTo(`/pages/business/zhxf/fireInspect/inspectDetailsList/index?productCode=${productCode}&productName=${productName}`);
|
|
@@ -104,7 +81,6 @@ function handleToDetails(productCode, productName) {
|
|
|
*/
|
|
|
function load() {
|
|
|
pageSize.value += 10;
|
|
|
- // init();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -112,14 +88,11 @@ function load() {
|
|
|
*/
|
|
|
function refresh() {
|
|
|
pageSize.value = 20;
|
|
|
- // total.value = 0;
|
|
|
- // init();
|
|
|
}
|
|
|
|
|
|
onShow(() => {
|
|
|
//调用系统主题颜色
|
|
|
proxy.$settingStore.systemThemeColor([1]);
|
|
|
|
|
|
- // init();
|
|
|
});
|
|
|
</script>
|