|
@@ -1,73 +1,45 @@
|
|
|
<template>
|
|
|
<u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
|
|
|
- <u-tabs :list="tabsList" :current="tabsCurrent" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }"
|
|
|
- :inactiveStyle="{ color: '#909399' }" :scrollable="false"></u-tabs>
|
|
|
+ <u-tabs :list="tabsList" :current="tabsCurrent" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }" :scrollable="false"></u-tabs>
|
|
|
</u-sticky>
|
|
|
|
|
|
- <oa-scroll customClass="scroll-height" :pageSize="pageSize" :total="total" :refresherLoad="true"
|
|
|
- :refresherEnabled="true" :refresherDefaultStyle="'none'" :refresherThreshold="44" :lowerThreshold="44"
|
|
|
- :refresherBackground="'#f5f6f7'" @load="load" @refresh="refresh"
|
|
|
- :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
|
|
|
- <!-- <template #default>
|
|
|
- <view class="alarmDetailsList-container">
|
|
|
- <view class="menu-list margin-0">
|
|
|
- <view class="list-cell list-cell-arrow" v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base)">
|
|
|
-
|
|
|
- <view class="menu-item" style="font-size: 13px; flex-flow: row wrap">
|
|
|
- <view style="min-width: 80%; margin-bottom: 5px; color: #909399"> {{ base.alarmTime }}</view>
|
|
|
- <view style="min-width: 20%; margin-bottom: 5px; color: #909399; text-align: right; padding-right: 15px"> {{ base.alarmGrade }}级</view>
|
|
|
- <view style="min-width: 80%; margin-bottom: 5px; color: #909399">{{ base.deviceName }}</view>
|
|
|
- <view style="min-width: 20%; margin-bottom: 5px; text-align: right; padding-right: 15px" :style="`color:${base.handleStatus == 1 ? '#16bf00' : 'red'}`">
|
|
|
- {{ base.handleStatus == 1 ? "已处理" : "未处理" }}
|
|
|
- </view>
|
|
|
- <view style="min-width: 50%; padding-right: 15px">{{ base.alarmContent }}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </template> -->
|
|
|
-
|
|
|
-
|
|
|
+ <oa-scroll
|
|
|
+ customClass="scroll-height"
|
|
|
+ :pageSize="pageSize"
|
|
|
+ :total="total"
|
|
|
+ :refresherLoad="true"
|
|
|
+ :refresherEnabled="true"
|
|
|
+ :refresherDefaultStyle="'none'"
|
|
|
+ :refresherThreshold="44"
|
|
|
+ :lowerThreshold="44"
|
|
|
+ :refresherBackground="'#f5f6f7'"
|
|
|
+ @load="load"
|
|
|
+ @refresh="refresh"
|
|
|
+ :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
|
|
|
+ >
|
|
|
<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)">
|
|
|
+ <view class="list-cell list-cell-arrow" style="line-height: 25px" v-for="(base, index) in dataList" :key="index" @click="handleToDetails(base)">
|
|
|
<view class="menu-item">
|
|
|
- <image class="image-bg"
|
|
|
+ <image
|
|
|
+ class="image-bg"
|
|
|
style="width: 80rpx; height: 80rpx; margin: auto 10px auto 0"
|
|
|
- :src="base.handleStatus == 1 ? '/static/images/fireInspect/processed-icon.png' : '/static/images/fireInspect/process-icon.png'">
|
|
|
+ :src="base.handleStatus == 1 ? '/static/images/fireInspect/processed-icon.png' : '/static/images/fireInspect/process-icon.png'"
|
|
|
+ >
|
|
|
</image>
|
|
|
- <view
|
|
|
- style="width: calc(100% - 51px); display: flex; justify-content: space-between;align-items: center; padding-right: 10px">
|
|
|
- <view class="deviceHeader" v-if="productName=='人工督察单'">
|
|
|
- <view class="deviceName text-ellipsis">{{ base.productCode }}</view>
|
|
|
- <view class="deviceName text-ellipsis"> {{ base.alarmAddress }}</view>
|
|
|
- <view class="deviceName text-ellipsis">{{ base.alarmTime }}</view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
- <view class="deviceHeader" v-else>
|
|
|
+ <view style="width: calc(100% - 51px); display: flex; justify-content: space-between; align-items: center; padding-right: 10px">
|
|
|
+ <view class="deviceHeader">
|
|
|
<view class="deviceName text-ellipsis">{{ base.superviseCode }}</view>
|
|
|
<view class="deviceName text-ellipsis"> {{ base.content }}</view>
|
|
|
- <view class="deviceName text-ellipsis">{{ base.timestamp?base.timestamp.replace("T", " "):'' }}</view>
|
|
|
+ <view class="deviceName text-ellipsis">{{ base.timestamp ? base.timestamp.replace("T", " ") : "" }}</view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
- <view class="" v-if="base.handleStatus == 1" style="color: #16bf00;margin-right:10px"> 已处理 </view>
|
|
|
- <view class="" v-if="base.handleStatus == 0" style="color: red;margin-right:10px"> 未处理 </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view>
|
|
|
-
|
|
|
+ <view class="" v-if="base.handleStatus == 1" style="color: #16bf00; margin-right: 10px"> 已处理 </view>
|
|
|
+ <view class="" v-if="base.handleStatus == 0" style="color: red; margin-right: 10px"> 未处理 </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</oa-scroll>
|
|
|
</template>
|
|
|
|
|
@@ -76,7 +48,7 @@ import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, on
|
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
|
|
|
import { useStores, commonStores } from "@/store/modules/index";
|
|
|
|
|
|
-import { eleInspectList } from "@/api/business/zhxf/fireInspect/index.js";
|
|
|
+import { eleInspectList, persInspectList } from "@/api/business/zhxf/fireInspect/index.js";
|
|
|
import { baseAlarmList } from "@/api/business/fireIot/alarmManage.js";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
@@ -97,7 +69,6 @@ const tabsList = ref([
|
|
|
},
|
|
|
]);
|
|
|
const tabsCurrent = ref(0);
|
|
|
-
|
|
|
const dataList = ref([]);
|
|
|
const productCode = ref("");
|
|
|
const productName = ref("");
|
|
@@ -117,61 +88,43 @@ function init() {
|
|
|
* @api接口查询
|
|
|
*/
|
|
|
function selectListApi() {
|
|
|
- if(productName.value=='电子督察单'){
|
|
|
- eleInspectList({
|
|
|
- // productCode: productCode.value,
|
|
|
- handleStatus: tabsList.value[tabsCurrent.value].value,
|
|
|
- pageNum: current.value,
|
|
|
- pageSize: pageSize.value,
|
|
|
- }).then((requset) => {
|
|
|
- if (requset.status === "SUCCESS") {
|
|
|
- dataList.value = requset.data.records;
|
|
|
- total.value = requset.data.total;
|
|
|
-
|
|
|
- uni.setNavigationBarTitle({
|
|
|
- title: `${productName.value}(${total.value})`,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- }else{
|
|
|
-
|
|
|
- baseAlarmList({
|
|
|
- productCode: productCode.value,
|
|
|
- handleStatus: tabsList.value[tabsCurrent.value].value,
|
|
|
- current: current.value,
|
|
|
- size: pageSize.value,
|
|
|
- }).then((requset) => {
|
|
|
- if (requset.status === "SUCCESS") {
|
|
|
+ if (productName.value == "电子督察单") {
|
|
|
+ eleInspectList({
|
|
|
+ handleStatus: tabsList.value[tabsCurrent.value].value,
|
|
|
+ pageNum: current.value,
|
|
|
+ pageSize: pageSize.value,
|
|
|
+ }).then((requset) => {
|
|
|
+ if (requset.status === "SUCCESS") {
|
|
|
dataList.value = requset.data.records;
|
|
|
total.value = requset.data.total;
|
|
|
uni.setNavigationBarTitle({
|
|
|
- title: `${productName.value}(${total.value})`,
|
|
|
+ title: `${productName.value}(${total.value})`,
|
|
|
});
|
|
|
}
|
|
|
-});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ persInspectList({
|
|
|
+ handleStatus: tabsList.value[tabsCurrent.value].value,
|
|
|
+ pageNum: current.value,
|
|
|
+ pageSize: pageSize.value,
|
|
|
+ }).then((requset) => {
|
|
|
+ if (requset.status === "SUCCESS") {
|
|
|
+ dataList.value = requset.data.records;
|
|
|
+ total.value = requset.data.total;
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: `${productName.value}(${total.value})`,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @跳转详情事件
|
|
|
*/
|
|
|
function handleToDetails(e) {
|
|
|
- console.log(e)
|
|
|
- if(productName.value=='电子督察单'){
|
|
|
- proxy.$tab.navigateTo(`/pages/business/zhxf/fireInspect/inspectDetails/index?id=${e.id}&productName=${productName.value}`);
|
|
|
-
|
|
|
- }else{
|
|
|
- // proxy.$tab.navigateTo(`/pages/business/zhxf/fireInspect/inspectDetails/index?deviceName=${e.deviceName}&alarmTime=${e.alarmTime}&productName=${productName.value}`);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ console.log(e);
|
|
|
+ proxy.$tab.navigateTo(`/pages/business/zhxf/fireInspect/inspectDetails/index?id=${e.id}&productName=${productName.value}`);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -199,7 +152,7 @@ function tabsClick(e) {
|
|
|
init();
|
|
|
}
|
|
|
|
|
|
-onReady(() => { });
|
|
|
+onReady(() => {});
|
|
|
|
|
|
onShow(() => {
|
|
|
init();
|
|
@@ -210,7 +163,7 @@ onShow(() => {
|
|
|
onLoad((options) => {
|
|
|
if ("productName" in options) {
|
|
|
productName.value = options.productName;
|
|
|
- }
|
|
|
+ }
|
|
|
if ("productCode" in options) {
|
|
|
productCode.value = options.productCode;
|
|
|
init();
|
|
@@ -219,5 +172,6 @@ onLoad((options) => {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.alarmDetailsList-container {}
|
|
|
+.alarmDetailsList-container {
|
|
|
+}
|
|
|
</style>
|