|
@@ -1,19 +1,22 @@
|
|
|
<template>
|
|
|
<van-nav-bar
|
|
|
+ fixed
|
|
|
title="信息上报中心"
|
|
|
left-text=""
|
|
|
left-arrow
|
|
|
@click-left="onClickLeft"
|
|
|
/>
|
|
|
- <div class="main">
|
|
|
+ <van-loading size="16px" v-show="isLoading">加载中...</van-loading>
|
|
|
+ <div class="main" v-show="!isLoading">
|
|
|
<p class="title">安防设施异常上报</p>
|
|
|
<div class="formArea">
|
|
|
<p class="miniTitle">基础信息</p>
|
|
|
<van-cell-group>
|
|
|
<van-field
|
|
|
- v-model="securityFacilitiesErr.siteName.name"
|
|
|
+ v-model="info.siteName.name"
|
|
|
readonly
|
|
|
required
|
|
|
+ center
|
|
|
label="场所名称:"
|
|
|
placeholder="请选择"
|
|
|
input-align="right"
|
|
@@ -34,7 +37,7 @@
|
|
|
<van-cell-group>
|
|
|
|
|
|
<van-field
|
|
|
- v-model="securityFacilitiesErr.facilityTypename"
|
|
|
+ v-model="info.facilityTypename"
|
|
|
center
|
|
|
readonly
|
|
|
required
|
|
@@ -54,9 +57,9 @@
|
|
|
</van-popup>
|
|
|
</van-cell-group>
|
|
|
|
|
|
- <van-cell-group v-if="securityFacilitiesErr.facilityType==''">
|
|
|
+ <van-cell-group v-if="info.facilityType==''">
|
|
|
<van-field
|
|
|
- v-model="securityFacilitiesErr.facilityTypename"
|
|
|
+ v-model="info.facilityTypename"
|
|
|
center
|
|
|
readonly
|
|
|
required
|
|
@@ -67,9 +70,9 @@
|
|
|
/>
|
|
|
</van-cell-group>
|
|
|
|
|
|
- <van-cell-group v-if="securityFacilitiesErr.facilityType=='0'">
|
|
|
+ <van-cell-group v-if="info.facilityType=='0'">
|
|
|
<van-field
|
|
|
- v-model="securityFacilitiesErr.videoAudioPoint.name"
|
|
|
+ v-model="info.videoAudioPoint.name"
|
|
|
readonly
|
|
|
required
|
|
|
label="音视频点位:"
|
|
@@ -89,9 +92,9 @@
|
|
|
</van-popup>
|
|
|
</van-cell-group>
|
|
|
|
|
|
- <van-cell-group v-if="securityFacilitiesErr.facilityType=='1'">
|
|
|
+ <van-cell-group v-if="info.facilityType=='1'">
|
|
|
<van-field
|
|
|
- v-model="securityFacilitiesErr.siteFireProtection.name"
|
|
|
+ v-model="info.siteFireProtection.name"
|
|
|
readonly
|
|
|
required
|
|
|
label="消防点位:"
|
|
@@ -131,7 +134,7 @@
|
|
|
<van-cell-group>
|
|
|
<div class="rowTextArea">
|
|
|
<van-field
|
|
|
- v-model="securityFacilitiesErr.abnormalContent"
|
|
|
+ v-model="info.abnormalContent"
|
|
|
center
|
|
|
rows="2"
|
|
|
type="textarea"
|
|
@@ -160,7 +163,7 @@ export default {
|
|
|
const onClickLeft = () => {
|
|
|
history.back();
|
|
|
};
|
|
|
- const securityFacilitiesErr = reactive({
|
|
|
+ const info = reactive({
|
|
|
id: "",
|
|
|
siteName: {
|
|
|
id: "",
|
|
@@ -197,7 +200,7 @@ export default {
|
|
|
const getPlace = ({ selectedOptions }) => {
|
|
|
if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){
|
|
|
showPlace.value = false;
|
|
|
- securityFacilitiesErr.siteName = selectedOptions[0];
|
|
|
+ info.siteName = selectedOptions[0];
|
|
|
//场所选择完成后刷新
|
|
|
getVideoAudioList();
|
|
|
getFireStationList();
|
|
@@ -208,8 +211,8 @@ export default {
|
|
|
const facilityTypes = [{text:"监控、音频",value:"0"},{text:"消防设备",value:"1"}];
|
|
|
const getfacilityType= ({ selectedOptions }) => {
|
|
|
if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){
|
|
|
- securityFacilitiesErr.facilityType = selectedOptions[0].value;
|
|
|
- securityFacilitiesErr.facilityTypename = selectedOptions[0].text;
|
|
|
+ info.facilityType = selectedOptions[0].value;
|
|
|
+ info.facilityTypename = selectedOptions[0].text;
|
|
|
getVideoAudioList();
|
|
|
getFireStationList();
|
|
|
showLx.value = false;
|
|
@@ -221,12 +224,12 @@ export default {
|
|
|
let VideoAudios = ref([]);
|
|
|
//同时选择好场所、设施类型后才获取视频列表
|
|
|
const getVideoAudioList= () => {
|
|
|
- if(securityFacilitiesErr.siteName.id!=""&&securityFacilitiesErr.facilityType=="0"){
|
|
|
+ if(info.siteName.id!=""&&info.facilityType=="0"){
|
|
|
new tools()
|
|
|
.videoPointList({
|
|
|
current: 1,
|
|
|
size: 10000,
|
|
|
- siteId: securityFacilitiesErr.siteName.id,
|
|
|
+ siteId: info.siteName.id,
|
|
|
})
|
|
|
.then(({ records }) => {
|
|
|
VideoAudios.value=records;
|
|
@@ -236,8 +239,8 @@ export default {
|
|
|
};
|
|
|
const setVideoAudios= ({ selectedOptions }) => {
|
|
|
if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){
|
|
|
- securityFacilitiesErr.videoAudioPoint = selectedOptions[0];
|
|
|
- securityFacilitiesErr.position=selectedOptions[0].position;
|
|
|
+ info.videoAudioPoint = selectedOptions[0];
|
|
|
+ info.position=selectedOptions[0].position;
|
|
|
showVideoAudio.value = false;
|
|
|
}
|
|
|
};
|
|
@@ -248,12 +251,12 @@ export default {
|
|
|
let FireStations = ref([]);
|
|
|
//同时选择好场所、设施类型后才获取消防点位列表
|
|
|
const getFireStationList= () => {
|
|
|
- if(securityFacilitiesErr.siteName.id!=""&&securityFacilitiesErr.facilityType=="1"){
|
|
|
+ if(info.siteName.id!=""&&info.facilityType=="1"){
|
|
|
new tools()
|
|
|
.fireStationList({
|
|
|
current: 1,
|
|
|
size: 10000,
|
|
|
- siteId: securityFacilitiesErr.siteName.id,
|
|
|
+ siteId: info.siteName.id,
|
|
|
})
|
|
|
.then(({ records }) => {
|
|
|
FireStations.value=records;
|
|
@@ -263,8 +266,8 @@ export default {
|
|
|
};
|
|
|
const setFireStations= ({ selectedOptions }) => {
|
|
|
if(selectedOptions[0]!=undefined&&selectedOptions[0]!=null){
|
|
|
- securityFacilitiesErr.siteFireProtection = selectedOptions[0];
|
|
|
- securityFacilitiesErr.position=selectedOptions[0].position;
|
|
|
+ info.siteFireProtection = selectedOptions[0];
|
|
|
+ info.position=selectedOptions[0].position;
|
|
|
showFireStation.value = false;
|
|
|
}
|
|
|
};
|
|
@@ -307,15 +310,15 @@ export default {
|
|
|
// 提交数据
|
|
|
const submit = () => {
|
|
|
//添加保存前判断
|
|
|
- if(siteInspection.siteName.id==""){
|
|
|
+ if(info.siteName.id==""){
|
|
|
window.xm.showToast({
|
|
|
message:"请先选择场所信息!"
|
|
|
})
|
|
|
}else{
|
|
|
|
|
|
//保存前附件处理
|
|
|
- siteInspection.enclosure = fileupList.value.map((option) => option.url).join("|");
|
|
|
- new securityFacilitiesErrService().save(securityFacilitiesErr).then((res) => {
|
|
|
+ info.enclosure = fileupList.value.map((option) => option.url).join("|");
|
|
|
+ new securityFacilitiesErrService().save(info).then((res) => {
|
|
|
if(res.data=="保存安防设施异常成功"){
|
|
|
window.xm.showToast({
|
|
|
message:"保存成功!"
|
|
@@ -328,7 +331,7 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
- securityFacilitiesErr,
|
|
|
+ info,
|
|
|
// 场所
|
|
|
customFieldName,
|
|
|
showPlace,
|
|
@@ -365,39 +368,35 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-* {
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
-}
|
|
|
-.main {
|
|
|
- background: #fff;
|
|
|
+.van-cell__value .van-field__right-icon .van-icon-location {
|
|
|
+ color: #36a7f3 !important;
|
|
|
}
|
|
|
-.main p {
|
|
|
- height: 40px;
|
|
|
- line-height: 40px;
|
|
|
+.van-uploader .van-button {
|
|
|
+ border: none;
|
|
|
color: #36a7f3;
|
|
|
- border-bottom: 1px solid #eee;
|
|
|
-}
|
|
|
-.title {
|
|
|
- font-size: 20px;
|
|
|
- font-weight: 700;
|
|
|
- padding-left: 20px;
|
|
|
-}
|
|
|
-.miniTitle {
|
|
|
- font-size: 16px;
|
|
|
-}
|
|
|
-.formArea {
|
|
|
- padding: 0px 20px;
|
|
|
+ top: -4px;
|
|
|
}
|
|
|
-.formArea .van-cell-group .van-field__label {
|
|
|
- height: 40px;
|
|
|
+.van-dialog {
|
|
|
+ width: 80%;
|
|
|
+ top: 50%;
|
|
|
}
|
|
|
-.formArea .van-cell-group .van-cell {
|
|
|
- line-height: 40px;
|
|
|
+.van-loading {
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 80px;
|
|
|
}
|
|
|
-.van-cell__value .van-field__right-icon .van-icon-location {
|
|
|
- color: #36a7f3 !important;
|
|
|
+.preview-cover {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ width: 100%;
|
|
|
+ padding: 4px;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: center;
|
|
|
+ background: rgba(0, 0, 0, 0.3);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
.rowTextArea::v-deep .van-field__value {
|
|
|
width: 94%;
|
|
|
border: 2px solid #ccc;
|
|
@@ -407,21 +406,4 @@ export default {
|
|
|
.rowTextArea::v-deep .van-cell {
|
|
|
display: flow-root;
|
|
|
}
|
|
|
-.subbtn {
|
|
|
- margin: 20px;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-.subbtn .van-button {
|
|
|
- width: 40%;
|
|
|
- margin: 5px;
|
|
|
-}
|
|
|
-.van-uploader .van-button {
|
|
|
- border: none;
|
|
|
- color: #36a7f3;
|
|
|
- top: -4px;
|
|
|
-}
|
|
|
-.van-dialog {
|
|
|
- width: 80%;
|
|
|
- top: 50%;
|
|
|
-}
|
|
|
</style>
|