| | |
| | | :key="item.id" |
| | | > |
| | | <span>报警图片</span> |
| | | <img :src="item" /> |
| | | <!-- <img :src="item" /> --> |
| | | <el-image style="width:240px" :src="item" :preview-src-list="[item]"> </el-image> |
| | | <span v-if="index === 0" |
| | | >报警时间:{{ currentEvent.alarmTime }}</span |
| | | > |
| | | </div> |
| | | <div class="img-item" v-for="item in imageList" :key="item.id"> |
| | | <img :src="item" /> |
| | | <!-- <img :src="item" /> --> |
| | | <el-image style="width:240px" :src="item" :preview-src-list="[item]"> </el-image> |
| | | </div> |
| | | <el-form |
| | | ref="currentEvent" |
| | |
| | | label-position="left" |
| | | class="left-form" |
| | | > |
| | | <el-form-item label="事件编号:"> |
| | | <!-- <el-form-item label="事件编号:"> |
| | | <span>{{ currentEvent.code }}</span> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | <el-form-item label="事件等级:"> |
| | | <span>{{ currentEvent.grade }}</span> |
| | | </el-form-item> |
| | |
| | | import { FILE_ORIGINAL_URL } from "@/utils"; |
| | | import { validateCarNum } from "@/utils/validate"; |
| | | import MyDispatch from "@/components/dispatch"; |
| | | import InspectionTable from "@/views/intelligentPatrol/studyJudge/inspectionTable/index.vue"; |
| | | import MyMap from "@/components/map"; |
| | | // import InspectionTable from "@/views/intelligentPatrol/studyJudge/inspectionTable/index.vue"; |
| | | // import MyMap from "@/components/map"; |
| | | import MyMap from "@/components/map/leafletMap.vue"; |
| | | |
| | | export default { |
| | | components: { MyDispatch, MyMap, InspectionTable }, |
| | | components: { MyDispatch, MyMap }, |
| | | created() { |
| | | this.getInspectionData(); |
| | | if (this.info) { |
| | | this.currentEvent = this.info; |
| | | this.loadData(); |
| | | } else { |
| | | this.getInspectionData(); |
| | | } |
| | | this.initEventParams(); |
| | | this.getInspectionCount(); |
| | | getStoreInfoList({ current: 1, size: 100 }) |
| | |
| | | mounted() { |
| | | this.timer = setInterval(() => { |
| | | this.getInspectionCount(); |
| | | }, 1000 * 10); |
| | | }, 1000 * 60 * 15); |
| | | }, |
| | | data() { |
| | | const validateCarNumber = (rule, value, callback) => { |
| | |
| | | currentEvent: {}, |
| | | stateList: [ |
| | | { |
| | | id: 2, |
| | | id: 10, |
| | | label: "上报", |
| | | }, |
| | | { |
| | |
| | | }, |
| | | |
| | | getInspectionData() { |
| | | let data = { |
| | | current: this.currentPage, |
| | | pageSize: 1, |
| | | videoId: this.seachData.videoId, |
| | | }; |
| | | if (this.seachData.alarmTime) { |
| | | data.beginTime = this.seachData.alarmTime[0]; |
| | | data.endTime = this.seachData.alarmTime[1]; |
| | | } |
| | | if (this.seachData.gradeId) { |
| | | data.gradeId = this.seachData.gradeId[1]; |
| | | } |
| | | basecase |
| | | .getInspectionData({ current: this.currentPage }) |
| | | .then(({ records }) => { |
| | | this.currentEvent = records[0]; |
| | | this.point = { |
| | | x: this.currentEvent.longitude, |
| | | y: this.currentEvent.latitude, |
| | | }; |
| | | this.zoom = 19; |
| | | this.mark = { title: this.currentEvent.address }; |
| | | if (this.currentEvent?.picData) { |
| | | this.imageList = this.currentEvent.picData |
| | | .split(",") |
| | | .map((item) => `${FILE_ORIGINAL_URL}${item}`); |
| | | } |
| | | if ( |
| | | this.currentEvent?.alarmTime || |
| | | this.currentEvent?.currentAlarmTime |
| | | ) { |
| | | const { alarmTime, currentAlarmTime } = this.currentEvent; |
| | | const continueAlarmTime = |
| | | new Date().getTime() - |
| | | (currentAlarmTime |
| | | ? new Date(currentAlarmTime).getTime() |
| | | : new Date(alarmTime).getTime()); |
| | | const CONTINUE_DAY = continueAlarmTime / 1000 / 60 / 60 / 24; |
| | | const CONTINUE_HOURS = (CONTINUE_DAY - parseInt(CONTINUE_DAY)) * 24; |
| | | this.currentEvent.conntinueTime = `${parseInt( |
| | | CONTINUE_DAY |
| | | )}天${parseInt(CONTINUE_HOURS)}小时`; |
| | | .getInspectionData(data) |
| | | .then(({ records, total }) => { |
| | | this.countData.review = total; |
| | | if (records.length > 0) { |
| | | this.currentEvent = records[0]; |
| | | this.loadData(); |
| | | } else { |
| | | this.currentEvent = {}; |
| | | this.$message("当前查询条件无数据"); |
| | | } |
| | | }) |
| | | .catch((err) => this.$message.error(err)); |
| | | }, |
| | | |
| | | loadData() { |
| | | this.point = { |
| | | x: this.currentEvent.longitude, |
| | | y: this.currentEvent.latitude, |
| | | }; |
| | | this.zoom = 18; |
| | | this.mark = { title: this.currentEvent.address }; |
| | | if (this.currentEvent?.picData) { |
| | | this.imageList = this.currentEvent.picData |
| | | .split(",") |
| | | .map((item) => `${FILE_ORIGINAL_URL}sccg/API/img?fileUrl=${item}`); |
| | | // this.imageList =['https://www.shutterstock.com/image-photo/grandmother-holding-grandson-her-lap-600w-1954531321.jpg','https://www.shutterstock.com/image-photo/grandmother-holding-grandson-her-lap-600w-1954531321.jpg'] |
| | | } |
| | | if (this.currentEvent?.alarmTime || this.currentEvent?.currentAlarmTime) { |
| | | const { alarmTime, currentAlarmTime } = this.currentEvent; |
| | | const continueAlarmTime = |
| | | new Date().getTime() - |
| | | (currentAlarmTime |
| | | ? new Date(currentAlarmTime).getTime() |
| | | : new Date(alarmTime).getTime()); |
| | | const CONTINUE_DAY = continueAlarmTime / 1000 / 60 / 60 / 24; |
| | | const CONTINUE_HOURS = (CONTINUE_DAY - parseInt(CONTINUE_DAY)) * 24; |
| | | this.currentEvent.conntinueTime = `${parseInt( |
| | | CONTINUE_DAY |
| | | )}天${parseInt(CONTINUE_HOURS)}小时`; |
| | | } |
| | | }, |
| | | // 确认点击事件 |
| | | handleConfirm() { |
| | | this.$refs.currentEvent.validate((flag) => { |
| | |
| | | if (res) { |
| | | // 连接客户端成功 |
| | | this.ws.login({ |
| | | loginIp: "183.245.159.161", |
| | | loginPort: "8282", |
| | | loginIp: "172.28.194.180", |
| | | loginPort: "7902", |
| | | userName: "suichang", |
| | | userPwd: "a12345677", |
| | | https: 1, |
| | |
| | | second = second < 10 ? "0" + second : second; |
| | | return y + "-" + m + "-" + d + " " + h + ":" + minute + ":" + second; |
| | | }, |
| | | resetAll() { |
| | | this.seachData = {}; |
| | | }, |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.timer); |
| | | this.timer = null; |
| | | }, |
| | | |
| | | props: ["info", "seachData"], |
| | | }; |
| | | </script> |
| | | |
| | |
| | | height: 100%; |
| | | min-width: 460px; |
| | | } |
| | | .header { |
| | | line-height: normal; |
| | | } |
| | | </style> |