| | |
| | | <template> |
| | | <div>预警研判</div> |
| | | <div class="study-judge"> |
| | | <div class="study-judge-header"> |
| | | <span>您有{{ eventList.length }}条待审核报警信息,今日立案0条,再学习{{ countData.review }}条</span> |
| | | </div> |
| | | <div class="study-judge-main"> |
| | | <div class="sjm-header"> |
| | | <div class="sjm-header-left"> |
| | | <span class="moni-name">监控点位名称: {{ currentEvent.name }} </span> |
| | | <span class="moni-area">{{ currentEvent.street }}</span> |
| | | </div> |
| | | <div class="sjm-header-right"> |
| | | <el-button size="small">实时预览</el-button> |
| | | <el-button size="small">录像回放</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="sjm-content"> |
| | | <div class="sjm-content-left"> |
| | | <div class="img-item" v-for="(item, index) in imageList" :key="item.id"> |
| | | <span>报警图片</span> |
| | | <img :src="item"> |
| | | <span v-if="index === 0">报警时间:{{ currentEvent.alarmTime }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="sjm-content-center"> |
| | | 地图容器 |
| | | </div> |
| | | <div class="sjm-content-right"> |
| | | <div class="card-box"> |
| | | <div class="card-header"> |
| | | <span>报警记录</span> |
| | | <span>乱停乱放违法占道</span> |
| | | </div> |
| | | <el-form ref="currentEvent" label-width="120px" :model="currentEvent" :rules="rules"> |
| | | <el-form-item label="事件编号:"> |
| | | <span>{{ currentEvent.code }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="事件等级:"> |
| | | <span>{{ currentEvent.grade }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="首次报警时间:"> |
| | | <span>{{ currentEvent.firstTime }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="最近报警时间:"> |
| | | <span>{{ currentEvent.recentTime }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="持续时间:"> |
| | | <span>{{ currentEvent.conntinueTime }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="处理意见:" prop="advice"> |
| | | <el-radio-group v-model="currentEvent.advice"> |
| | | <el-radio :label="item.id" v-for="item in adviceList" :key="item.id">{{ item.label }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="大类名称:" prop="categoryId"> |
| | | <el-input v-model="currentEvent.categoryId" placeholder="请选择大类名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="小类名称:" prop="typeId"> |
| | | <el-input v-model="currentEvent.typeId" placeholder="请选择小类名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="车牌号:" prop="carNumber"> |
| | | <el-input v-model="currentEvent.carNumber" placeholder="请填写车牌号码"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注:" prop="description"> |
| | | <el-input type="textarea" :rows="5" v-model="currentEvent.description"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="pageChange('prev')">上一条</el-button> |
| | | <el-button @click.native.prevent="handleConfirm">确认</el-button> |
| | | <el-button @click="pageChange('next')">下一条</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | import basecase from "@/api/operate/basecase"; |
| | | import { FILE_ORIGINAL_URL } from "@/utils"; |
| | | |
| | | export default { |
| | | created() { |
| | | this.getInspectionData(); |
| | | basecase.getInspectionCountData() |
| | | .then(res => { |
| | | this.countData = res; |
| | | }) |
| | | .catch(err => this.$message.error(err)) |
| | | }, |
| | | data() { |
| | | return { |
| | | eventList: [], |
| | | countData: { |
| | | review: 0 |
| | | }, |
| | | currentEvent: {}, |
| | | adviceList: [ |
| | | { |
| | | id: 1, |
| | | label: '上报', |
| | | }, |
| | | { |
| | | id: 2, |
| | | label: '调度', |
| | | }, |
| | | { |
| | | id: 3, |
| | | label: '再学习', |
| | | }, |
| | | { |
| | | id: 4, |
| | | label: '暂不处理', |
| | | }, |
| | | ], |
| | | rules:{ |
| | | advice:[ |
| | | { |
| | | required: true, trigger:['blur', 'change'], message: '处理意见不能为空' |
| | | }, |
| | | ], |
| | | categoryId:[ |
| | | { |
| | | required: true, trigger:['blur', 'change'], message: '大类名称不能为空' |
| | | } |
| | | ], |
| | | typeId:[ |
| | | { |
| | | required: true, trigger:['blur', 'change'], message: '小类名称不能为空' |
| | | } |
| | | ], |
| | | carNumber:[ |
| | | { |
| | | required: true, trigger:['blur', 'change'], message: '车牌号不能为空' |
| | | } |
| | | ] |
| | | }, |
| | | imageList: [], |
| | | currentPage: 1 |
| | | } |
| | | }, |
| | | methods:{ |
| | | pageChange(type) { |
| | | if (this.eventList.length === this.currentPage) { |
| | | this.$message.warning('当前已是最后一页'); |
| | | return; |
| | | } |
| | | if (type === 'next') { |
| | | this.currentPage += 1; |
| | | } else { |
| | | this.currentPage -= 1; |
| | | } |
| | | this.currentEvent = this.eventList[this.currentPage - 1]; |
| | | }, |
| | | |
| | | getInspectionData() { |
| | | basecase.getInspectionData({ current: this.currentPage }) |
| | | .then(({ records }) => { |
| | | this.eventList = records; |
| | | this.eventList.forEach(item => { |
| | | if (item.picData) { |
| | | const imageUrls = item.picData.split(','); |
| | | this.imageList = imageUrls.map(url => `${FILE_ORIGINAL_URL}${url}`); |
| | | } |
| | | }) |
| | | this.currentEvent = this.eventList[this.currentPage - 1]; |
| | | }) |
| | | .catch(err => this.$message.error(err)) |
| | | }, |
| | | |
| | | // 确认点击事件 |
| | | handleConfirm(){ |
| | | this.$refs.currentEvent.validate((flag)=>{ |
| | | if(flag){ |
| | | basecase.confirmInspection(this.currentEvent) |
| | | .then(() => { |
| | | this.$message.success('操作成功'); |
| | | this.getInspectionData(); |
| | | }) |
| | | .catch(err => this.$message.error(err)) |
| | | } else { |
| | | this.$message.warning('请检查必填项') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | <style lang="scss" scoped> |
| | | .study-judge { |
| | | text-align: left; |
| | | color: #4b9bb7; |
| | | padding: 20px; |
| | | .study-judge-header { |
| | | line-height: 8vh; |
| | | } |
| | | |
| | | .study-judge-main { |
| | | .sjm-header { |
| | | line-height: 8vh; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .sjm-header-left { |
| | | flex: 1; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | |
| | | .moni-area { |
| | | margin-left: 4vw; |
| | | } |
| | | } |
| | | |
| | | .sjm-header-right { |
| | | flex: 1; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | |
| | | .el-button { |
| | | padding: 0 1vw; |
| | | height: 4vh; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .sjm-content { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .sjm-content-left { |
| | | line-height: 4.8vh; |
| | | |
| | | .img-item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | img { |
| | | width: 15vw; |
| | | height: 20vh; |
| | | } |
| | | } |
| | | |
| | | .img-item+.img-item { |
| | | margin-top: 2vh; |
| | | } |
| | | } |
| | | |
| | | .sjm-content-right { |
| | | .card-box { |
| | | .card-header { |
| | | line-height: 4.8vh; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .el-form { |
| | | ::v-deep .el-form-item { |
| | | } |
| | | |
| | | ::v-deep .el-form-item__label { |
| | | color: #4b9bb7; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-radio__label { |
| | | color: #4b9bb7; |
| | | } |
| | | } |
| | | </style> |