|
@@ -2,7 +2,6 @@
|
|
|
import apis from "@/api"
|
|
import apis from "@/api"
|
|
|
import config from "@/core/config"
|
|
import config from "@/core/config"
|
|
|
const props = defineProps<{ type: number }>()
|
|
const props = defineProps<{ type: number }>()
|
|
|
-const searchRef = ref()
|
|
|
|
|
const listBoxHeight = 630
|
|
const listBoxHeight = 630
|
|
|
const loadingText = ref("")
|
|
const loadingText = ref("")
|
|
|
const status = ref("more")
|
|
const status = ref("more")
|
|
@@ -36,8 +35,8 @@ const swipeOption =
|
|
|
},
|
|
},
|
|
|
]
|
|
]
|
|
|
const searchInfo = ref({
|
|
const searchInfo = ref({
|
|
|
- company_name: "",
|
|
|
|
|
- warn_type: "",
|
|
|
|
|
|
|
+ companyName: "",
|
|
|
|
|
+ warnType: "",
|
|
|
})
|
|
})
|
|
|
const alarmTypes = ref<any>([])
|
|
const alarmTypes = ref<any>([])
|
|
|
function onChange() {
|
|
function onChange() {
|
|
@@ -64,10 +63,8 @@ function query(next?: boolean) {
|
|
|
goTop()
|
|
goTop()
|
|
|
}
|
|
}
|
|
|
loadingText.value = "加载中..."
|
|
loadingText.value = "加载中..."
|
|
|
- if (searchRef.value) {
|
|
|
|
|
- search.params.company_name = searchRef.value.searchInfo?.company_name ?? ""
|
|
|
|
|
- search.params.warn_type = searchRef.value.searchInfo?.warn_type ?? ""
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ search.params.company_name = searchInfo.value?.companyName ?? ""
|
|
|
|
|
+ search.params.warn_type = searchInfo.value?.warnType ?? ""
|
|
|
if (!search.params.company_name) {
|
|
if (!search.params.company_name) {
|
|
|
delete search.params.company_name
|
|
delete search.params.company_name
|
|
|
}
|
|
}
|
|
@@ -109,7 +106,6 @@ function goTop() {
|
|
|
}
|
|
}
|
|
|
const dialogRef = ref()
|
|
const dialogRef = ref()
|
|
|
const modalDetailInfo = ref<any>({})
|
|
const modalDetailInfo = ref<any>({})
|
|
|
-const modalDetailShow = ref(false)
|
|
|
|
|
const showEditBtn = ref(props.type == 0)
|
|
const showEditBtn = ref(props.type == 0)
|
|
|
const modalDetailTitle = ref(props.type == 0 ? "上报" : "查看详情")
|
|
const modalDetailTitle = ref(props.type == 0 ? "上报" : "查看详情")
|
|
|
const form = ref<any>({
|
|
const form = ref<any>({
|
|
@@ -236,7 +232,14 @@ function buildPicUrl() {
|
|
|
|
|
|
|
|
return result.join(",")
|
|
return result.join(",")
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+onShow(() => {
|
|
|
|
|
+ getWarnTypes()
|
|
|
|
|
+ query()
|
|
|
|
|
+})
|
|
|
|
|
+onReady(() => {
|
|
|
|
|
+ getWarnTypes()
|
|
|
|
|
+ query()
|
|
|
|
|
+})
|
|
|
onLoad(() => {
|
|
onLoad(() => {
|
|
|
getWarnTypes()
|
|
getWarnTypes()
|
|
|
query()
|
|
query()
|
|
@@ -247,16 +250,16 @@ onLoad(() => {
|
|
|
<view class="container">
|
|
<view class="container">
|
|
|
<view class="px-3 py-2 content">
|
|
<view class="px-3 py-2 content">
|
|
|
<uni-forms ref="form" style="">
|
|
<uni-forms ref="form" style="">
|
|
|
- <uni-forms-item class="my-2" label="企业名称" labelWidth="80" name="">
|
|
|
|
|
|
|
+ <!-- <uni-forms-item class="my-2" label="企业名称" labelWidth="80" name="">
|
|
|
<uni-easyinput
|
|
<uni-easyinput
|
|
|
- v-model="searchInfo.company_name"
|
|
|
|
|
|
|
+ v-model="searchInfo.companyName"
|
|
|
placeholder="请输入企业名称"
|
|
placeholder="请输入企业名称"
|
|
|
@change="onChange"
|
|
@change="onChange"
|
|
|
></uni-easyinput>
|
|
></uni-easyinput>
|
|
|
- </uni-forms-item>
|
|
|
|
|
- <uni-forms-item class="mb-1" label="告警类型" labelWidth="80">
|
|
|
|
|
|
|
+ </uni-forms-item> -->
|
|
|
|
|
+ <uni-forms-item class="my-1" label="告警类型" labelWidth="80">
|
|
|
<uni-data-select
|
|
<uni-data-select
|
|
|
- v-model="searchInfo.warn_type"
|
|
|
|
|
|
|
+ v-model="searchInfo.warnType"
|
|
|
:localdata="alarmTypes"
|
|
:localdata="alarmTypes"
|
|
|
placeholder="请选择告警类型"
|
|
placeholder="请选择告警类型"
|
|
|
clear
|
|
clear
|
|
@@ -274,10 +277,10 @@ onLoad(() => {
|
|
|
:scroll-y="true"
|
|
:scroll-y="true"
|
|
|
@scroll="scroll"
|
|
@scroll="scroll"
|
|
|
:scroll-top="scrollTop"
|
|
:scroll-top="scrollTop"
|
|
|
- :style="{ height: listBoxHeight + 'px', zIndex: 0 }"
|
|
|
|
|
|
|
+ :style="{ height: listBoxHeight + 'px', zIndex: 0, paddingBottom: '15px' }"
|
|
|
>
|
|
>
|
|
|
<uni-swipe-action>
|
|
<uni-swipe-action>
|
|
|
- <view class="px-3">
|
|
|
|
|
|
|
+ <view class="px-3" v-if="dataList.length">
|
|
|
<view v-for="(v, i) in dataList" :key="i">
|
|
<view v-for="(v, i) in dataList" :key="i">
|
|
|
<view class="item-box">
|
|
<view class="item-box">
|
|
|
<uni-swipe-action-item :right-options="swipeOption" :name="i" @click="viewDetail(v)">
|
|
<uni-swipe-action-item :right-options="swipeOption" :name="i" @click="viewDetail(v)">
|
|
@@ -340,22 +343,22 @@ onLoad(() => {
|
|
|
<scroll-view scroll-y="true" style="height: 300px">
|
|
<scroll-view scroll-y="true" style="height: 300px">
|
|
|
<view class="modal-item">
|
|
<view class="modal-item">
|
|
|
<view class="left">公司名称:</view>
|
|
<view class="left">公司名称:</view>
|
|
|
- <view class="right">{{ modalDetailInfo.warnDetail.company_name }}</view>
|
|
|
|
|
|
|
+ <view class="right">{{ modalDetailInfo?.warnDetail?.company_name }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="modal-item">
|
|
<view class="modal-item">
|
|
|
<view class="left">告警设备:</view>
|
|
<view class="left">告警设备:</view>
|
|
|
- <view class="right">{{ modalDetailInfo.warnDetail.device_name }}</view>
|
|
|
|
|
|
|
+ <view class="right">{{ modalDetailInfo?.warnDetail?.device_name }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="modal-item">
|
|
<view class="modal-item">
|
|
|
<view class="left">告警类型:</view>
|
|
<view class="left">告警类型:</view>
|
|
|
- <view class="right">{{ modalDetailInfo.warnDetail.warn_type_name }}</view>
|
|
|
|
|
|
|
+ <view class="right">{{ modalDetailInfo?.warnDetail?.warn_type_name }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="modal-item mb-2">
|
|
<view class="modal-item mb-2">
|
|
|
<view class="left">告警时间:</view>
|
|
<view class="left">告警时间:</view>
|
|
|
- <view class="right">{{ modalDetailInfo.warnDetail.warn_start_time }}</view>
|
|
|
|
|
|
|
+ <view class="right">{{ modalDetailInfo?.warnDetail?.warn_start_time }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view
|
|
<view
|
|
|
- v-for="(item2, index2) in modalDetailInfo.processInfoList"
|
|
|
|
|
|
|
+ v-for="(item2, index2) in modalDetailInfo?.processInfoList"
|
|
|
:key="index2"
|
|
:key="index2"
|
|
|
style="padding: 10px 0; border-top: 1px solid #333"
|
|
style="padding: 10px 0; border-top: 1px solid #333"
|
|
|
>
|
|
>
|