From 2cc2f4f83a90aac000792a3b65aac9c1aeedbdf1 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 13 十一月 2023 17:33:24 +0800
Subject: [PATCH] +1
---
src/views/intelligentPatrol/studyJudge/index.vue | 153 +++++++++++++++++++++++++++++++-------------------
1 files changed, 95 insertions(+), 58 deletions(-)
diff --git a/src/views/intelligentPatrol/studyJudge/index.vue b/src/views/intelligentPatrol/studyJudge/index.vue
index 305858c..fd6310b 100644
--- a/src/views/intelligentPatrol/studyJudge/index.vue
+++ b/src/views/intelligentPatrol/studyJudge/index.vue
@@ -31,7 +31,7 @@
<!-- <span>{{ currentEvent.address }}</span>-->
<!-- </div>-->
<span @click="openDialogTable" class="count-data-span"
- >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{
+ >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{
countData.register
}}鏉�,鍐嶅涔爗{ countData.study }}鏉�</span
>
@@ -48,13 +48,15 @@
: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"
@@ -64,9 +66,9 @@
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>
@@ -100,7 +102,7 @@
>
</div>
<div class="card-header">
- <span>鎶ヨ璁板綍--{{ currentEvent.algoName }}</span>
+ <span>鎶ヨ璁板綍--{{ currentEvent.alarmName }}</span>
</div>
<el-form
ref="currentEvent"
@@ -229,7 +231,7 @@
</div>
</el-dialog>
<el-dialog :visible.sync="isShowTable" title="鎶ヨ淇℃伅" width="1200px">
- <inspection-table/>
+ <inspection-table />
</el-dialog>
</div>
</template>
@@ -241,21 +243,21 @@
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();
- basecase
- .getInspectionCountData()
- .then((res) => {
- this.countData = res;
- })
- .catch((err) => this.$message.error(err));
-
+ this.getInspectionCount();
getStoreInfoList({ current: 1, size: 100 })
.then(({ list }) => {
this.storeList = list;
@@ -280,8 +282,8 @@
},
mounted() {
this.timer = setInterval(() => {
- setTimeout(this.getInspectionData, 0);
- }, 1000 * 10);
+ this.getInspectionCount();
+ }, 1000 * 60 * 15);
},
data() {
const validateCarNumber = (rule, value, callback) => {
@@ -296,7 +298,7 @@
}
};
return {
- isShowTable:false,
+ isShowTable: false,
timer: null,
countData: {
study: 0,
@@ -306,7 +308,7 @@
currentEvent: {},
stateList: [
{
- id: 2,
+ id: 10,
label: "涓婃姤",
},
{
@@ -374,8 +376,18 @@
};
},
methods: {
- openDialogTable(){
- this.isShowTable = true
+ getInspectionCount() {
+ basecase
+ .getInspectionCountData({
+ showLoading: false,
+ })
+ .then((res) => {
+ this.countData = res;
+ })
+ .catch((err) => this.$message.error(err));
+ },
+ openDialogTable() {
+ this.isShowTable = true;
},
pageChange(type) {
if (type === "next") {
@@ -387,41 +399,59 @@
},
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) => {
@@ -497,8 +527,8 @@
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,
@@ -637,11 +667,16 @@
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>
@@ -689,13 +724,12 @@
.sjm-content-left {
line-height: 4.8vh;
- .count-data-span{
+ .count-data-span {
cursor: pointer;
color: #66b1ff;
}
.left-form > ::v-deep.el-form-item__label {
font-size: 16px !important;
-
}
.img-item {
display: flex;
@@ -747,4 +781,7 @@
height: 100%;
min-width: 460px;
}
+.header {
+ line-height: normal;
+}
</style>
--
Gitblit v1.8.0