From 79c5d6a424c52ec50e856cdab5d98474cfd02be8 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 07 Mar 2023 17:01:40 +0800
Subject: [PATCH] 火灾管理火灾补录
---
src/views/fire/fireManage.vue | 98 ++++++++++++++++++++++++++++++++++---------------
1 files changed, 68 insertions(+), 30 deletions(-)
diff --git a/src/views/fire/fireManage.vue b/src/views/fire/fireManage.vue
index 16b8d5e..cab9fa1 100644
--- a/src/views/fire/fireManage.vue
+++ b/src/views/fire/fireManage.vue
@@ -29,13 +29,17 @@
</el-button>
</template>
- <!-- <template slot-scope="{row}" slot="location">-->
- <!-- {{row.$location.split("|").join("")}}-->
- <!-- </template>-->
+ <template slot-scope="{row}" slot="level">
+ <span style="color: red" v-if="row.level == '1' ">{{row.$level}}</span>
+ <span style="color: #f65f44" v-if="row.level == '2' ">{{row.$level}}</span>
+ <span style="color: #f6a944" v-if="row.level == '3' ">{{row.$level}}</span>
+ <span style="color: #70b603" v-if="row.level == '4' ">{{row.$level}}</span>
+ <span style="color: #2cff00" v-if="row.level == '5' ">{{row.$level}}</span>
+ </template>
<template slot-scope="{type,size,row,index}" slot="menu">
<el-button icon="el-icon-edit" :size="size" :type="type" @click="goToViewDetail(row)">详 情</el-button>
- <el-button icon="el-icon-delete" :size="size" :type="type" @click="goToFireSupplement(row)">补 录</el-button>
+ <el-button icon="el-icon-delete" :size="size" :type="type" :disabled="row.supplementId !='' " @click="goToFireSupplement(row)">补 录</el-button>
</template>
</avue-crud>
</basic-container>
@@ -92,19 +96,14 @@
prop: "no",
type: "input",
search: true,
- searchSpan: 4,
+ searchSpan: 3,
},
{
- label: "行政区域",
- prop: "location",
- span: 24,
- type: "cascader",
- props: {
- label: 'title',
- value: 'key'
- },
- dicUrl: 'api/blade-system/region/lazy-tree',
- slot: true
+ label: "火灾位置",
+ prop: "address",
+ type: "input",
+ search: true,
+ searchSpan: 3,
},
{
label: "发现方式",
@@ -116,7 +115,39 @@
value: "dictKey"
},
search: true,
- searchSpan: 4,
+ searchSpan: 3,
+ },
+ {
+ label: "处置状态",
+ prop: "status",
+ type: "select",
+ dicUrl: '/api/blade-system/dict-biz/dictionary?code=fire_handle_status',
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ search: true,
+ searchSpan: 3,
+ },
+
+ {
+ label: "行政区域",
+ prop: "location",
+ span: 24,
+ type: "cascader",
+ props: {
+ label: 'title',
+ value: 'key'
+ },
+ dicUrl: 'api/blade-system/region/lazy-tree',
+ slot: true,
+ search:true,
+ hide:true,
+ searchSpan:3,
+ dicFormatter(res){
+ res.data.shift()
+ return res.data
+ }
},
{
label: "火灾等级",
@@ -129,28 +160,28 @@
},
},
{
- label: "处置状态",
- prop: "status",
- type: "select",
- dicUrl: '/api/blade-system/dict-biz/dictionary?code=fire_handle_status',
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- search: true,
- searchSpan: 4,
- },
- {
label: "报警人",
prop: "caller",
type: "input",
},
{
label: "报警时间",
+ type: 'datetimerange',
+ prop:'alarmTimeRange',
+ format:'yyyy-MM-dd HH:mm:ss',
+ valueFormat:'yyyy-MM-dd HH:mm:ss',
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ hide: true,
+ search: true,
+ searchRange:true,
+ searchSpan: 3
+ },
+ {
+ label: "报警时间",
prop: "alarmTime",
type: "input",
- search: true,
- searchSpan: 4,
},
{
label: "火灾描述",
@@ -360,6 +391,10 @@
},
onLoad(page, params = {}) {
this.loading = true;
+ if (this.query.alarmTimeRange &&this.query.alarmTimeRange.length>0){
+ this.query.alarmTimeStart = this.query.alarmTimeRange[0]
+ this.query.alarmTimeEnd = this.query.alarmTimeRange[1]
+ }
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
@@ -371,6 +406,7 @@
this.selectionClear();
});
},
+ //展示详情
goToViewDetail(data) {
getSupplementDetail(data.id).then(res => {
if (res.data.code == 200) {
@@ -384,6 +420,7 @@
}
})
},
+ //跳转到火灾补录
goToFireSupplement(data) {
//要使跳转页接收到值,必须用name
this.$router.push({
@@ -391,6 +428,7 @@
params: data
})
},
+ //跳转到列表页
goToList(){
this.isDetail = !this.isDetail
}
--
Gitblit v1.9.3