From 91a2e0d1cdc2b4ad816d5ee450f159ef6cd57486 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 03 四月 2023 21:51:27 +0800
Subject: [PATCH] 预警研判
---
src/components/map/leafletMap.vue | 198 ++--
src/views/intelligentPatrol/studyJudge/index.vue | 1509 ++++++++++++++++++++----------------------
src/router/index.js | 2
src/views/intelligentPatrol/studyJudge/tablePage.vue | 332 +++++++++
4 files changed, 1,146 insertions(+), 895 deletions(-)
diff --git a/src/components/map/leafletMap.vue b/src/components/map/leafletMap.vue
index 9deeb37..96e2b42 100644
--- a/src/components/map/leafletMap.vue
+++ b/src/components/map/leafletMap.vue
@@ -1,112 +1,114 @@
<template>
- <div class="map-container" id="map-container"></div>
+ <div class="map-container" id="map-container"></div>
</template>
<script>
export default {
- name: "map",
- components: {},
- data() {
- return {
- map: null,
- map_point: { x: "119.27179890", y: "28.59027084" },
- map_zoom: 15,
- mapUrl:
- "http://172.28.194.179:41005/tilermap/rest/services/mapserver/baidu-image-db/{z}/{x}/{y}",
- // mapUrls: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
- // mapUrls: "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}",
- option: {
- crs: L.CRS.Baidu,
- minZoom: 2,
- maxZoom: 19,
- zoomControl: true, // 绂佺敤 + - 鎸夐挳
- doubleClickZoom: true, // 绂佺敤鍙屽嚮鏀惧ぇ
- attributionControl: false, // 绉婚櫎鍙充笅瑙抣eaflet鏍囪瘑
- dragging: true, // 绂佹榧犳爣鎷栧姩婊氬姩
- boxZoom: true, // 鍐冲畾鍦板浘鏄惁鍙缂╂斁鍒伴紶鏍囨嫋鎷藉嚭鐨勭煩褰㈢殑瑙嗗浘锛岄紶鏍囨嫋鎷芥椂闇�瑕佸悓鏃舵寜浣弒hift閿�.
- scrollWheelZoom: true, // 绂佹榧犳爣婊氬姩缂╂斁
- },
- options: {
- position: "topright",
- drawPolygon: true, // 娣诲姞缁樺埗澶氳竟褰�
- drawMarker: false, // 娣诲姞鎸夐挳浠ョ粯鍒舵爣璁�
- drawCircleMarker: false, // 娣诲姞鎸夐挳浠ョ粯鍒跺渾褰㈡爣璁�
- drawPolyline: false, // 娣诲姞鎸夐挳缁樺埗绾挎潯
- drawRectangle: false, // 娣诲姞鎸夐挳缁樺埗鐭╁舰
- drawCircle: false, // 娣诲姞鎸夐挳缁樺埗鍦嗗湀
- editMode: false, // 娣诲姞鎸夐挳缂栬緫澶氳竟褰�
- dragMode: false, // 娣诲姞鎸夐挳鎷栧姩澶氳竟褰�
- cutPolygon: false, // 娣诲姞涓�涓寜閽互鍒犻櫎鍥惧眰閲岄潰鐨勯儴鍒嗗唴瀹�
- removalMode: true, // 娓呴櫎鍥惧眰
- },
- };
- },
- mounted() {
- console.log('/* 鍒涘缓鍦板浘瀹炰緥 */')
- setTimeout(() => {
- this.createrMap();
- }, 100);
- },
- methods: {
- /* 鍒涘缓鍦板浘瀹炰緥 */
- createrMap() {
+ name: "map",
+ components: {},
+ data() {
+ return {
+ map: null,
+ marker: null,
+ map_point: { x: "119.27179890", y: "28.59027084" },
+ map_zoom: 15,
+ mapUrl:
+ "http://172.28.194.179:41005/tilermap/rest/services/mapserver/baidu-image-db/{z}/{x}/{y}",
+ // mapUrls: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
+ // mapUrls: "http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}",
+ option: {
+ crs: L.CRS.Baidu,
+ minZoom: 2,
+ maxZoom: 19,
+ zoomControl: true, // 绂佺敤 + - 鎸夐挳
+ doubleClickZoom: true, // 绂佺敤鍙屽嚮鏀惧ぇ
+ attributionControl: false, // 绉婚櫎鍙充笅瑙抣eaflet鏍囪瘑
+ dragging: true, // 绂佹榧犳爣鎷栧姩婊氬姩
+ boxZoom: true, // 鍐冲畾鍦板浘鏄惁鍙缂╂斁鍒伴紶鏍囨嫋鎷藉嚭鐨勭煩褰㈢殑瑙嗗浘锛岄紶鏍囨嫋鎷芥椂闇�瑕佸悓鏃舵寜浣弒hift閿�.
+ scrollWheelZoom: true, // 绂佹榧犳爣婊氬姩缂╂斁
+ },
+ options: {
+ position: "topright",
+ drawPolygon: true, // 娣诲姞缁樺埗澶氳竟褰�
+ drawMarker: false, // 娣诲姞鎸夐挳浠ョ粯鍒舵爣璁�
+ drawCircleMarker: false, // 娣诲姞鎸夐挳浠ョ粯鍒跺渾褰㈡爣璁�
+ drawPolyline: false, // 娣诲姞鎸夐挳缁樺埗绾挎潯
+ drawRectangle: false, // 娣诲姞鎸夐挳缁樺埗鐭╁舰
+ drawCircle: false, // 娣诲姞鎸夐挳缁樺埗鍦嗗湀
+ editMode: false, // 娣诲姞鎸夐挳缂栬緫澶氳竟褰�
+ dragMode: false, // 娣诲姞鎸夐挳鎷栧姩澶氳竟褰�
+ cutPolygon: false, // 娣诲姞涓�涓寜閽互鍒犻櫎鍥惧眰閲岄潰鐨勯儴鍒嗗唴瀹�
+ removalMode: true, // 娓呴櫎鍥惧眰
+ },
+ };
+ },
+ mounted() {
+ console.log("/* 鍒涘缓鍦板浘瀹炰緥 */");
+ setTimeout(() => {
+ this.createrMap();
+ }, 100);
+ },
+ methods: {
+ /* 鍒涘缓鍦板浘瀹炰緥 */
+ createrMap() {
+ this.option.center = [eval(this.map_point.y), eval(this.map_point.x)];
+ this.option.zoom = this.map_zoom;
+ this.map = this.$map.createrMap("map-container", this.option);
+ // this.$map.createrLayers(this.map, this.mapUrls) //鍒囩墖鍦板浘
+ // this.$map.createrChinatm(this.map, this.mapUrl); // 鍥惧眰
- this.option.center = [eval(this.map_point.y), eval(this.map_point.x)];
- this.option.zoom = this.map_zoom;
- this.map = this.$map.createrMap("map-container", this.option);
- // this.$map.createrLayers(this.map, this.mapUrls) //鍒囩墖鍦板浘
- // this.$map.createrChinatm(this.map, this.mapUrl); // 鍥惧眰
-
- this.map.pm.setLang("zh");
- // this.map.pm.addControls(this.options);
- // this.map.on("pm:drawstart", (e) => {
- // // // workingLayer.on('pm:create', e => {
- // // console.log("缁樺埗寮�濮�");
- // // console.log(e);
- // // // });
- // });
- // this.map.on("pm:drawend", (e) => {
- // // // workingLayer.on('pm:create', e => {
- // // console.log("缁樺埗缁撴潫");
- // // // });
- // });
- this.locationMap();
-
- },
- locationMap() {
- debugger
- if (this.map_point && this.map_point.y) {
- this.map.setView([eval(this.map_point.y), eval(this.map_point.x)], this.map_zoom);
-
- }
- if (this.mark && this.map) {
- // 鍒涘缓涓�涓� Marker 瀹炰緥锛�
- var marker = L.marker([eval(this.map_point.y), eval(this.map_point.x)]).addTo(
- this.map
- );
- let that = this
- // 灏嗗垱寤虹殑鐐规爣璁版坊鍔犲埌宸叉湁鐨勫湴鍥惧疄渚嬶細
- marker.on("click", function (e) {
- that.$emit("fatherMethod");
- });
- }
- },
+ this.map.pm.setLang("zh");
+ // this.map.pm.addControls(this.options);
+ // this.map.on("pm:drawstart", (e) => {
+ // // // workingLayer.on('pm:create', e => {
+ // // console.log("缁樺埗寮�濮�");
+ // // console.log(e);
+ // // // });
+ // });
+ // this.map.on("pm:drawend", (e) => {
+ // // // workingLayer.on('pm:create', e => {
+ // // console.log("缁樺埗缁撴潫");
+ // // // });
+ // });
+ this.locationMap();
},
- watch: {
- point(newval, oldval) {
- this.map_point = newval;
- this.locationMap();
- },
- zoom(newval, oldval) {
- this.map_zoom = newval;
- },
+ locationMap() {
+ if (this.map_point && this.map_point.y) {
+ this.map.setView(
+ [eval(this.map_point.y), eval(this.map_point.x)],
+ this.map_zoom
+ );
+ }
+ if (this.mark && this.map) {
+ if (this.marker) this.map.removeLayer(this.marker);
+ // 鍒涘缓涓�涓� Marker 瀹炰緥锛�
+ this.marker = L.marker([
+ eval(this.map_point.y),
+ eval(this.map_point.x),
+ ]).addTo(this.map);
+ let that = this;
+ // 灏嗗垱寤虹殑鐐规爣璁版坊鍔犲埌宸叉湁鐨勫湴鍥惧疄渚嬶細
+ this.marker.on("click", function (e) {
+ that.$emit("fatherMethod");
+ });
+ }
},
- props: ["point", "zoom", "mark"],
+ },
+ watch: {
+ point(newval, oldval) {
+ this.map_point = newval;
+ this.locationMap();
+ },
+ zoom(newval, oldval) {
+ this.map_zoom = newval;
+ },
+ },
+ props: ["point", "zoom", "mark"],
};
</script>
<style >
.map-container {
- width: 100%;
- height: 100%;
+ width: 100%;
+ height: 100%;
}
</style>
diff --git a/src/router/index.js b/src/router/index.js
index 2d7fc01..de2ed93 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -358,7 +358,7 @@
{
path: 'studyJudge', // 棰勮鐮斿垽
name: 'studyJudge',
- component: () => import('@/views/intelligentPatrol/studyJudge'),
+ component: () => import('@/views/intelligentPatrol/studyJudge/tablePage'),
},
{
path: 'illegalSearch', // 杩濊妫�绱�
diff --git a/src/views/intelligentPatrol/studyJudge/index.vue b/src/views/intelligentPatrol/studyJudge/index.vue
index c68957d..4d43eee 100644
--- a/src/views/intelligentPatrol/studyJudge/index.vue
+++ b/src/views/intelligentPatrol/studyJudge/index.vue
@@ -1,302 +1,236 @@
<template>
<div class="study-judge">
- <!-- <div class="study-judge-header">-->
- <!-- <span-->
- <!-- >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{-->
- <!-- countData.register-->
- <!-- }}鏉�,鍐嶅涔爗{ countData.study }}鏉�</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>-->
- <!-- <span>{{ currentEvent.address }}</span>-->
- <!-- </div>-->
- <!-- <div class="sjm-header-right">-->
- <!-- <el-button size="small" @click="createVideo(currentEvent, 'live')"-->
- <!-- >瀹炴椂棰勮</el-button-->
- <!-- >-->
- <!-- <el-button size="small" @click="createVideo(currentEvent, 'playback')"-->
- <!-- >褰曞儚鍥炴斁</el-button-->
- <!-- >-->
- <!-- </div>-->
- <!-- </div>-->
- <div class="sjm-content">
- <div class="sjm-content-left">
- <!-- <div class="sjm-header-left">-->
- <!-- <span class="moni-name">鐩戞帶鐐逛綅鍚嶇О: {{ currentEvent.name }} </span>-->
- <!-- <span class="moni-area">{{ currentEvent.street }}</span>-->
- <!-- <span>{{ currentEvent.address }}</span>-->
- <!-- </div>-->
- <span @click="openDialogTable" class="count-data-span"
- >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{
- countData.register
- }}鏉�,鍐嶅涔爗{ countData.study }}鏉�</span
- >
- <div class="sjm-header-left">
- <span class="moni-name"
- >鐩戞帶鐐逛綅鍚嶇О: {{ currentEvent.name }}
- </span>
- <span class="moni-area">{{ currentEvent.street }}</span>
- <span>{{ currentEvent.address }}</span>
- </div>
- <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
- class="img-item"
- v-for="item in imageList"
- :key="item.id"
- >
- <img :src="item" />
- </div>
- <el-form
- ref="currentEvent"
- label-width="120px"
- :model="eventInfoData"
- :rules="rules"
- label-position="left"
- class="left-form"
- >
- <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.alarmTime }}</span>
- </el-form-item>
- <el-form-item label="鏈�杩戞姤璀︽椂闂�:">
- <span>{{ currentEvent.currentAlarmTime }}</span>
- </el-form-item>
- <el-form-item label="鎸佺画鏃堕棿:">
- <span>{{ currentEvent.conntinueTime }}</span>
- </el-form-item>
- </el-form>
- </div>
- <div class="sjm-content-center">
- <div class="map">
- <MyMap :point="point" :zoom="zoom" :mark="mark"></MyMap>
- </div>
- <!-- <iframe src="https://183.245.159.161:8282/OneMap/index.html#/OneMap?code=2&clientVersion=&skin=white&locale=zh&otherAuthor=allowable"></iframe> -->
- </div>
- <div class="sjm-content-right">
- <div class="header">
- <el-form
- :inline="true"
- :model="seachData"
- class="demo-form-inline"
- >
- <el-form-item label="浜嬩欢绫诲瀷">
- <el-cascader
- v-model="seachData.gradeId"
- :options="eventGradeOptions"
- :props="options"
- clearable
- ></el-cascader>
- </el-form-item>
- <el-form-item label="鍙戠敓鐐逛綅">
- <el-select
- v-model="seachData.videoId"
- placeholder="璇烽�夋嫨"
- >
- <el-option
- v-for="item in videoOptions"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="鎶ヨ鏃堕棿">
- <el-date-picker
- v-model="seachData.alarmTime"
- type="daterange"
- align="right"
- unlink-panels
- range-separator="鑷�"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button
- type="primary"
- @click="getInspectionData"
- >鏌ヨ</el-button
- >
- <el-button type="primary" @click="resetAll"
- >閲嶇疆</el-button
- >
- </el-form-item>
- </el-form>
- </div>
- <div class="card-box">
- <div class="but-live">
- <el-button
- size="small"
- @click="createVideo(currentEvent, 'live')"
- >瀹炴椂棰勮</el-button
- >
- <el-button
- size="small"
- @click="createVideo(currentEvent, 'playback')"
- >褰曞儚鍥炴斁</el-button
- >
- </div>
- <div class="card-header">
- <span>鎶ヨ璁板綍--{{ currentEvent.algoName }}</span>
- </div>
- <el-form
- ref="currentEvent"
- label-width="120px"
- :model="eventInfoData"
- :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.alarmTime }}</span>-->
- <!-- </el-form-item>-->
- <!-- <el-form-item label="鏈�杩戞姤璀︽椂闂�:">-->
- <!-- <span>{{ currentEvent.currentAlarmTime }}</span>-->
- <!-- </el-form-item>-->
- <!-- <el-form-item label="鎸佺画鏃堕棿:">-->
- <!-- <span>{{ currentEvent.conntinueTime }}</span>-->
- <!-- </el-form-item>-->
- <el-form-item label="鍏宠仈搴楅摵" prop="store">
- <el-select
- v-model="eventInfoData.store"
- clearable
- @change="selectStoreChange"
- placeholder="璇烽�夋嫨鍏宠仈搴楅摵"
- >
- <el-option
- v-for="store in storeList"
- :value="store.id"
- :label="store.storeName"
- :key="store.id"
- />
- </el-select>
- </el-form-item>
- <el-form-item
- v-if="eventInfoData.store"
- label="搴楅摵寰楀垎:"
- >
- <span>{{
- selectStoreChange(eventInfoData.store)
- .storeScore
- }}</span>
- </el-form-item>
- <el-form-item label="澶勭悊鎰忚:" prop="state">
- <el-radio-group v-model="eventInfoData.state">
- <el-radio
- :label="item.id"
- v-for="item in stateList"
- :key="item.id"
- >{{ item.label }}</el-radio
- >
- </el-radio-group>
- </el-form-item>
- <el-form-item label="澶х被鍚嶇О:" prop="categoryId">
- <el-select
- v-model="eventInfoData.categoryId"
- placeholder="璇烽�夋嫨澶х被鍚嶇О"
- @change="categoryChange"
- >
- <el-option
- v-for="category in categoryOptions"
- :key="category.id"
- :value="category.id"
- :label="category.name"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="灏忕被鍚嶇О:" prop="typeId">
- <el-select
- v-model="eventInfoData.typeId"
- placeholder="璇烽�夋嫨灏忕被鍚嶇О"
- >
- <el-option
- v-for="type in typeOptions"
- :key="type.id"
- :value="type.id"
- :label="type.name"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="杞︾墝鍙�:" prop="carNumber">
- <el-input
- v-model="eventInfoData.carNumber"
- placeholder="璇峰~鍐欒溅鐗屽彿鐮�"
- ></el-input>
- </el-form-item>
- <el-form-item label="澶囨敞:" prop="description">
- <el-input
- type="textarea"
- :rows="5"
- v-model="eventInfoData.description"
- ></el-input>
- </el-form-item>
- <el-form-item>
- <el-button
- :disabled="currentPage === 1"
- @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>
- <el-dialog :visible="isShowDialog" title="璋冨害淇℃伅">
- <MyDispatch
- v-if="isShowDialog"
- :mytype="1"
- @getDispatchData="confirmInspection"
- :isGetData="true"
- @changeDialog="closeDialog"
- ></MyDispatch>
- </el-dialog>
- <el-dialog
- :visible.sync="dialogCreate"
- title="鏌ョ湅瑙嗛"
- v-show="dialogCreate"
- :before-close="handleClose2"
- >
- <div
- class="dom"
- style="width: 100%; height: 600px; position: relative"
+ <!-- <div class="study-judge-header">-->
+ <!-- <span-->
+ <!-- >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{-->
+ <!-- countData.register-->
+ <!-- }}鏉�,鍐嶅涔爗{ countData.study }}鏉�</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>-->
+ <!-- <span>{{ currentEvent.address }}</span>-->
+ <!-- </div>-->
+ <!-- <div class="sjm-header-right">-->
+ <!-- <el-button size="small" @click="createVideo(currentEvent, 'live')"-->
+ <!-- >瀹炴椂棰勮</el-button-->
+ <!-- >-->
+ <!-- <el-button size="small" @click="createVideo(currentEvent, 'playback')"-->
+ <!-- >褰曞儚鍥炴斁</el-button-->
+ <!-- >-->
+ <!-- </div>-->
+ <!-- </div>-->
+ <div class="sjm-content">
+ <div class="sjm-content-left">
+ <!-- <div class="sjm-header-left">-->
+ <!-- <span class="moni-name">鐩戞帶鐐逛綅鍚嶇О: {{ currentEvent.name }} </span>-->
+ <!-- <span class="moni-area">{{ currentEvent.street }}</span>-->
+ <!-- <span>{{ currentEvent.address }}</span>-->
+ <!-- </div>-->
+ <span @click="openDialogTable" class="count-data-span"
+ >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{
+ countData.register
+ }}鏉�,鍐嶅涔爗{ countData.study }}鏉�</span
>
- <div id="dom1" class="dom1"></div>
+ <div class="sjm-header-left">
+ <span class="moni-name"
+ >鐩戞帶鐐逛綅鍚嶇О: {{ currentEvent.name }}
+ </span>
+ <span class="moni-area">{{ currentEvent.street }}</span>
+ <span>{{ currentEvent.address }}</span>
</div>
- </el-dialog>
- <el-dialog :visible.sync="isShowTable" title="鎶ヨ淇℃伅" width="1200px">
- <inspection-table />
- </el-dialog>
+ <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 class="img-item" v-for="item in imageList" :key="item.id">
+ <img :src="item" />
+ </div>
+ <el-form
+ ref="currentEvent"
+ label-width="120px"
+ :model="eventInfoData"
+ :rules="rules"
+ label-position="left"
+ class="left-form"
+ >
+ <!-- <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.alarmTime }}</span>
+ </el-form-item>
+ <el-form-item label="鏈�杩戞姤璀︽椂闂�:">
+ <span>{{ currentEvent.currentAlarmTime }}</span>
+ </el-form-item>
+ <el-form-item label="鎸佺画鏃堕棿:">
+ <span>{{ currentEvent.conntinueTime }}</span>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div class="sjm-content-center">
+ <div class="map">
+ <MyMap :point="point" :zoom="zoom" :mark="mark"></MyMap>
+ </div>
+ <!-- <iframe src="https://183.245.159.161:8282/OneMap/index.html#/OneMap?code=2&clientVersion=&skin=white&locale=zh&otherAuthor=allowable"></iframe> -->
+ </div>
+ <div class="sjm-content-right">
+ <div class="card-box">
+ <div class="but-live">
+ <el-button size="small" @click="createVideo(currentEvent, 'live')"
+ >瀹炴椂棰勮</el-button
+ >
+ <el-button
+ size="small"
+ @click="createVideo(currentEvent, 'playback')"
+ >褰曞儚鍥炴斁</el-button
+ >
+ </div>
+ <div class="card-header">
+ <span>鎶ヨ璁板綍--{{ currentEvent.algoName }}</span>
+ </div>
+ <el-form
+ ref="currentEvent"
+ label-width="120px"
+ :model="eventInfoData"
+ :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.alarmTime }}</span>-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item label="鏈�杩戞姤璀︽椂闂�:">-->
+ <!-- <span>{{ currentEvent.currentAlarmTime }}</span>-->
+ <!-- </el-form-item>-->
+ <!-- <el-form-item label="鎸佺画鏃堕棿:">-->
+ <!-- <span>{{ currentEvent.conntinueTime }}</span>-->
+ <!-- </el-form-item>-->
+ <el-form-item label="鍏宠仈搴楅摵" prop="store">
+ <el-select
+ v-model="eventInfoData.store"
+ clearable
+ @change="selectStoreChange"
+ placeholder="璇烽�夋嫨鍏宠仈搴楅摵"
+ >
+ <el-option
+ v-for="store in storeList"
+ :value="store.id"
+ :label="store.storeName"
+ :key="store.id"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item v-if="eventInfoData.store" label="搴楅摵寰楀垎:">
+ <span>{{
+ selectStoreChange(eventInfoData.store).storeScore
+ }}</span>
+ </el-form-item>
+ <el-form-item label="澶勭悊鎰忚:" prop="state">
+ <el-radio-group v-model="eventInfoData.state">
+ <el-radio
+ :label="item.id"
+ v-for="item in stateList"
+ :key="item.id"
+ >{{ item.label }}</el-radio
+ >
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="澶х被鍚嶇О:" prop="categoryId">
+ <el-select
+ v-model="eventInfoData.categoryId"
+ placeholder="璇烽�夋嫨澶х被鍚嶇О"
+ @change="categoryChange"
+ >
+ <el-option
+ v-for="category in categoryOptions"
+ :key="category.id"
+ :value="category.id"
+ :label="category.name"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="灏忕被鍚嶇О:" prop="typeId">
+ <el-select
+ v-model="eventInfoData.typeId"
+ placeholder="璇烽�夋嫨灏忕被鍚嶇О"
+ >
+ <el-option
+ v-for="type in typeOptions"
+ :key="type.id"
+ :value="type.id"
+ :label="type.name"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="杞︾墝鍙�:" prop="carNumber">
+ <el-input
+ v-model="eventInfoData.carNumber"
+ placeholder="璇峰~鍐欒溅鐗屽彿鐮�"
+ ></el-input>
+ </el-form-item>
+ <el-form-item label="澶囨敞:" prop="description">
+ <el-input
+ type="textarea"
+ :rows="5"
+ v-model="eventInfoData.description"
+ ></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button
+ :disabled="currentPage === 1"
+ @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>
+ <el-dialog :visible="isShowDialog" title="璋冨害淇℃伅">
+ <MyDispatch
+ v-if="isShowDialog"
+ :mytype="1"
+ @getDispatchData="confirmInspection"
+ :isGetData="true"
+ @changeDialog="closeDialog"
+ ></MyDispatch>
+ </el-dialog>
+ <el-dialog
+ :visible.sync="dialogCreate"
+ title="鏌ョ湅瑙嗛"
+ v-show="dialogCreate"
+ :before-close="handleClose2"
+ >
+ <div class="dom" style="width: 100%; height: 600px; position: relative">
+ <div id="dom1" class="dom1"></div>
+ </div>
+ </el-dialog>
+ <el-dialog :visible.sync="isShowTable" title="鎶ヨ淇℃伅" width="1200px">
+ <inspection-table />
+ </el-dialog>
</div>
</template>
@@ -307,457 +241,440 @@
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 InspectionTable from "@/views/intelligentPatrol/studyJudge/inspectionTable/index.vue";
// import MyMap from "@/components/map";
import MyMap from "@/components/map/leafletMap.vue";
-import videoPoint from "@/api/system/videoPoint";
-import { getTypeList } from "@/utils/helper"
export default {
- components: { MyDispatch, MyMap, InspectionTable },
+ components: { MyDispatch, MyMap },
created() {
- this.loadVideo();
- this.loadEventGrade();
+ if (this.info) {
+ this.currentEvent = this.info;
+ this.loadData();
+ } else {
this.getInspectionData();
- this.initEventParams();
- this.getInspectionCount();
- getStoreInfoList({ current: 1, size: 100 })
- .then(({ list }) => {
- this.storeList = list;
- })
- .catch((err) => {
- this.$message.error(err);
- });
+ }
+ this.initEventParams();
+ this.getInspectionCount();
+ getStoreInfoList({ current: 1, size: 100 })
+ .then(({ list }) => {
+ this.storeList = list;
+ })
+ .catch((err) => {
+ this.$message.error(err);
+ });
- baseInfo
- .getCategoryList()
- .then((res) => {
- this.categoryOptions = res;
- })
- .catch((err) => this.$message.error(err));
+ baseInfo
+ .getCategoryList()
+ .then((res) => {
+ this.categoryOptions = res;
+ })
+ .catch((err) => this.$message.error(err));
- baseInfo
- .getTypeList()
- .then((res) => {
- this.typeList = res;
- })
- .catch((err) => this.$message.error(err));
+ baseInfo
+ .getTypeList()
+ .then((res) => {
+ this.typeList = res;
+ })
+ .catch((err) => this.$message.error(err));
},
mounted() {
- this.timer = setInterval(() => {
- this.getInspectionCount();
- }, 1000 * 60 * 15);
+ this.timer = setInterval(() => {
+ this.getInspectionCount();
+ }, 1000 * 60 * 15);
},
data() {
- const validateCarNumber = (rule, value, callback) => {
- if (value) {
- if (validateCarNum(value)) {
- callback();
- } else {
- callback(new Error("璇疯緭鍏ユ纭殑杞︾墝鍙�"));
- }
- } else {
- callback();
- }
- };
- return {
- isShowTable: false,
- timer: null,
- countData: {
- study: 0,
- review: 0,
- register: 0,
+ const validateCarNumber = (rule, value, callback) => {
+ if (value) {
+ if (validateCarNum(value)) {
+ callback();
+ } else {
+ callback(new Error("璇疯緭鍏ユ纭殑杞︾墝鍙�"));
+ }
+ } else {
+ callback();
+ }
+ };
+ return {
+ isShowTable: false,
+ timer: null,
+ countData: {
+ study: 0,
+ review: 0,
+ register: 0,
+ },
+ currentEvent: {},
+ stateList: [
+ {
+ id: 2,
+ label: "涓婃姤",
+ },
+ {
+ id: 6,
+ label: "璋冨害",
+ },
+ {
+ id: 3,
+ label: "鍐嶅涔�",
+ },
+ {
+ id: 4,
+ label: "鏆備笉澶勭悊",
+ },
+ ],
+ eventInfoData: null,
+ rules: {
+ state: [
+ {
+ required: true,
+ trigger: ["blur"],
+ message: "澶勭悊鎰忚涓嶈兘涓虹┖",
},
- currentEvent: {},
- stateList: [
- {
- id: 2,
- label: "涓婃姤",
- },
- {
- id: 6,
- label: "璋冨害",
- },
- {
- id: 3,
- label: "鍐嶅涔�",
- },
- {
- id: 4,
- label: "鏆備笉澶勭悊",
- },
- ],
- eventInfoData: null,
- rules: {
- state: [
- {
- required: true,
- trigger: ["blur"],
- message: "澶勭悊鎰忚涓嶈兘涓虹┖",
- },
- ],
- categoryId: [
- {
- required: true,
- trigger: ["blur"],
- message: "澶х被鍚嶇О涓嶈兘涓虹┖",
- },
- ],
- typeId: [
- {
- required: true,
- trigger: ["blur"],
- message: "灏忕被鍚嶇О涓嶈兘涓虹┖",
- },
- ],
- carNumber: [
- { trigger: ["blur", "change"], validator: validateCarNumber },
- ],
+ ],
+ categoryId: [
+ {
+ required: true,
+ trigger: ["blur"],
+ message: "澶х被鍚嶇О涓嶈兘涓虹┖",
},
- imageList: [],
- currentPage: 1,
- categoryOptions: [],
- typeOptions: [],
- storeList: [],
- typeList: [],
- isShowDialog: false,
- dialogCreate: false,
- cutPosX: 10,
- cutPosY: 10,
- cutWidth: 100,
- cutHeight: 100,
- crtPosX: 0,
- crtPosY: 0,
- crtWidth: 1000,
- crtHeight: 600,
- domId: "dom1",
- ctrl: "ctrl1",
- playType: "live",
- point: null,
- mark: null,
- zoom: null,
- eventGradeOptions: [],
- videoOptions: [],
- options: {
- label: 'name',
- value: 'id',
+ ],
+ typeId: [
+ {
+ required: true,
+ trigger: ["blur"],
+ message: "灏忕被鍚嶇О涓嶈兘涓虹┖",
},
- seachData: {}
- };
+ ],
+ carNumber: [
+ { trigger: ["blur", "change"], validator: validateCarNumber },
+ ],
+ },
+ imageList: [],
+ currentPage: 1,
+ categoryOptions: [],
+ typeOptions: [],
+ storeList: [],
+ typeList: [],
+ isShowDialog: false,
+ dialogCreate: false,
+ cutPosX: 10,
+ cutPosY: 10,
+ cutWidth: 100,
+ cutHeight: 100,
+ crtPosX: 0,
+ crtPosY: 0,
+ crtWidth: 1000,
+ crtHeight: 600,
+ domId: "dom1",
+ ctrl: "ctrl1",
+ playType: "live",
+ point: null,
+ mark: null,
+ zoom: null,
+ };
},
methods: {
- loadVideo() {
- videoPoint
- .getVideoPointList({
- current: 1,
- size: 1000
- })
- .then(({ records, total }) => {
- this.videoOptions = records;
- })
- },
- loadEventGrade() {
- getTypeList("1", "02").then((result) => {
- this.eventGradeOptions = result;
- })
- },
- 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") {
- this.currentPage += 1;
- } else {
- this.currentPage -= 1;
- }
- this.getInspectionData();
- },
-
- getInspectionData() {
- let data = {
- current: this.currentPage,
- 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(data)
- .then(({ records, total }) => {
- this.countData.review = total
- if (records.length > 0) {
- this.currentEvent = records[0];
- 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}`);
- }
- 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)}灏忔椂`;
- }
- } else {
- this.currentEvent = {}
- this.$message("褰撳墠鏌ヨ鏉′欢鏃犳暟鎹�");
- }
- })
- .catch((err) => this.$message.error(err));
- },
-
- // 纭鐐瑰嚮浜嬩欢
- handleConfirm() {
- this.$refs.currentEvent.validate((flag) => {
- if (flag) {
- this.eventInfoData.baseId = this.currentEvent.baseId;
-
- // 璋冨害
- if (this.eventInfoData.state === 6) {
- this.isShowDialog = true;
- } else {
- this.confirmInspection();
- }
- } else {
- this.$message.warning("璇锋鏌ュ繀濉」");
- }
- });
- },
-
- initEventParams() {
- this.eventInfoData = {
- baseId: null,
- store: null,
- state: null,
- categoryId: null,
- typeId: null,
- carNumber: null,
- description: null,
- linkShop: 0,
- shopName: null,
- };
- },
-
- categoryChange(id) {
- this.typeOptions = this.typeList.filter((type) => type.parentId === id);
- },
-
- confirmInspection(data) {
- const eventParams = Object.assign({}, this.eventInfoData);
- delete eventParams.store;
- basecase
- .confirmInspection({ ...eventParams, ...data })
- .then(() => {
- this.$message.success("鎿嶄綔鎴愬姛");
- this.getInspectionData();
- this.initEventParams();
- })
- .catch((err) => this.$message.error(err));
- },
-
- closeDialog() {
- this.isShowDialog = false;
- },
-
- selectStoreChange(id) {
- if (id === "") {
- this.eventInfoData.shopName = null;
- this.eventInfoData.linkShop = 0;
- this.eventInfoData.store = null;
- return;
- }
- const selectedStore = this.storeList.find((store) => store.id === id);
- this.eventInfoData.shopName = selectedStore.id;
- this.eventInfoData.linkShop = 1;
- return selectedStore;
- },
- handleClose2() {
- this.dialogCreate = false;
- this.destroy();
- },
- login() {
- // 璋冪敤鐧诲綍鎺ュ彛
- this.ws.detectConnectQt().then((res) => {
- if (res) {
- // 杩炴帴瀹㈡埛绔垚鍔�
- this.ws.login({
- loginIp: "172.28.194.180",
- loginPort: "7902",
- userName: "suichang",
- userPwd: "a12345677",
- https: 1,
- });
- this.$message.info("鐧诲綍涓�...");
- this.ws.on("loginState", (res) => {
- this.isLogin = res;
- if (res) {
- this.$message.success("鐧诲綍鎴愬姛");
- this.activePanel = "key2";
- } else {
- this.$message.info("鐧诲綍澶辫触");
- }
- });
- } else {
- // 杩炴帴瀹㈡埛绔け璐�
- this.$message.info("璇烽噸鏂板畨瑁呭鎴风");
- }
- });
- },
- logout() {
- // 璋冪敤鐧诲嚭鎺ュ彛
- this.ws.logout({
- loginIp: this.loginIp,
- });
- },
- createVideo(item, ctrlType) {
- this.playType = ctrlType;
- const DHWsInstance = DHWs.getInstance();
- this.ws = DHWsInstance;
- console.log(this.ws);
- this.login();
- // 璋冪敤鍒涘缓鎺т欢鎺ュ彛
- // if (!this.isLogin) {
- // this.$message.info('姝e湪鐧婚檰瀹㈡埛绔紝璇风◢绛�......');
- // return false;
- // }
- this.dialogCreate = true;
- setTimeout(() => {
- let _this = this;
- const params = [
- {
- // ctrlType: "realMonitorUI",
- ctrlType: "playerWin",
- ctrlCode: this.ctrl,
- ctrlProperty: {
- displayMode: ctrlType == "playback" ? 2 : 1,
- splitNum: 1,
- channelList: [{ channelId: item.videoCode }],
- },
- visible: true,
- domId: this.domId,
- },
- ];
- this.setPos();
-
- // _this.ws.on("createCtrlResult", (res) => {
- // console.warn(res);
- // });
-
- _this.ws
- .createCtrl(params)
- .then((res) => {
- this.$message.success("鍒涘缓鎴愬姛");
- console.log("res", res);
- })
- .catch((e) => {
- console.log("error;", e);
- });
-
- if (ctrlType == "playback") {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
-
- let beginTime = _this.formatDate(start);
- let endTime = _this.formatDate(end);
- const params = [
- {
- ctrlCode: this.ctrl,
- array: [
- {
- beginTime: beginTime,
- endTime: endTime,
- channelId: item.videoCode,
- },
- ],
- },
- ];
- _this.ws.openCtrlRecord(params);
- }
- }, 1000);
- },
- destroy() {
- // 璋冪敤閿�姣佹帶浠舵帴鍙�
- if (!this.isLogin) {
- this.$Message.info("姝e湪鐧婚檰瀹㈡埛绔紝璇风◢绛�......");
- return false;
- }
- const ctrls = this.ws.ctrls.map((i) => {
- if (i.ctrlCode === this.ctrl) {
- return i.ctrlCode;
- }
- });
- this.ws.destroyCtrl(ctrls);
- },
- setPos() {
- let target = document.getElementById(this.domId);
- console.log(target, "target");
- target.style.right = `${this.crtPosX}px`;
- target.style.top = `${this.crtPosY}px`;
- target.style.width = `${this.crtWidth}px`;
- target.style.height = `${this.crtHeight}px`;
- if (document.createEvent) {
- var event = document.createEvent("HTMLEvents");
- event.initEvent("resize", true, true);
- window.dispatchEvent(event);
- } else if (document.createEventObject) {
- window.fireEvent("onresize");
- }
- },
-
- // 鏃堕棿鎴宠浆 yyyy-MM-dd HH:mm:ss
- formatDate(inputTime) {
- var date = new Date(inputTime);
- var y = date.getFullYear();
- var m = date.getMonth() + 1;
- m = m < 10 ? "0" + m : m;
- var d = date.getDate();
- d = d < 10 ? "0" + d : d;
- var h = date.getHours();
- h = h < 10 ? "0" + h : h;
- var minute = date.getMinutes();
- var second = date.getSeconds();
- minute = minute < 10 ? "0" + minute : minute;
- second = second < 10 ? "0" + second : second;
- return y + "-" + m + "-" + d + " " + h + ":" + minute + ":" + second;
- },
- resetAll() {
- this.seachData = {}
+ 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") {
+ this.currentPage += 1;
+ } else {
+ this.currentPage -= 1;
}
+ this.getInspectionData();
+ },
+
+ 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(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() {
+ debugger;
+ 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}`);
+ }
+ 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 (flag) {
+ this.eventInfoData.baseId = this.currentEvent.baseId;
+
+ // 璋冨害
+ if (this.eventInfoData.state === 6) {
+ this.isShowDialog = true;
+ } else {
+ this.confirmInspection();
+ }
+ } else {
+ this.$message.warning("璇锋鏌ュ繀濉」");
+ }
+ });
+ },
+
+ initEventParams() {
+ this.eventInfoData = {
+ baseId: null,
+ store: null,
+ state: null,
+ categoryId: null,
+ typeId: null,
+ carNumber: null,
+ description: null,
+ linkShop: 0,
+ shopName: null,
+ };
+ },
+
+ categoryChange(id) {
+ this.typeOptions = this.typeList.filter((type) => type.parentId === id);
+ },
+
+ confirmInspection(data) {
+ const eventParams = Object.assign({}, this.eventInfoData);
+ delete eventParams.store;
+ basecase
+ .confirmInspection({ ...eventParams, ...data })
+ .then(() => {
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.getInspectionData();
+ this.initEventParams();
+ })
+ .catch((err) => this.$message.error(err));
+ },
+
+ closeDialog() {
+ this.isShowDialog = false;
+ },
+
+ selectStoreChange(id) {
+ if (id === "") {
+ this.eventInfoData.shopName = null;
+ this.eventInfoData.linkShop = 0;
+ this.eventInfoData.store = null;
+ return;
+ }
+ const selectedStore = this.storeList.find((store) => store.id === id);
+ this.eventInfoData.shopName = selectedStore.id;
+ this.eventInfoData.linkShop = 1;
+ return selectedStore;
+ },
+ handleClose2() {
+ this.dialogCreate = false;
+ this.destroy();
+ },
+ login() {
+ // 璋冪敤鐧诲綍鎺ュ彛
+ this.ws.detectConnectQt().then((res) => {
+ if (res) {
+ // 杩炴帴瀹㈡埛绔垚鍔�
+ this.ws.login({
+ loginIp: "172.28.194.180",
+ loginPort: "7902",
+ userName: "suichang",
+ userPwd: "a12345677",
+ https: 1,
+ });
+ this.$message.info("鐧诲綍涓�...");
+ this.ws.on("loginState", (res) => {
+ this.isLogin = res;
+ if (res) {
+ this.$message.success("鐧诲綍鎴愬姛");
+ this.activePanel = "key2";
+ } else {
+ this.$message.info("鐧诲綍澶辫触");
+ }
+ });
+ } else {
+ // 杩炴帴瀹㈡埛绔け璐�
+ this.$message.info("璇烽噸鏂板畨瑁呭鎴风");
+ }
+ });
+ },
+ logout() {
+ // 璋冪敤鐧诲嚭鎺ュ彛
+ this.ws.logout({
+ loginIp: this.loginIp,
+ });
+ },
+ createVideo(item, ctrlType) {
+ this.playType = ctrlType;
+ const DHWsInstance = DHWs.getInstance();
+ this.ws = DHWsInstance;
+ console.log(this.ws);
+ this.login();
+ // 璋冪敤鍒涘缓鎺т欢鎺ュ彛
+ // if (!this.isLogin) {
+ // this.$message.info('姝e湪鐧婚檰瀹㈡埛绔紝璇风◢绛�......');
+ // return false;
+ // }
+ this.dialogCreate = true;
+ setTimeout(() => {
+ let _this = this;
+ const params = [
+ {
+ // ctrlType: "realMonitorUI",
+ ctrlType: "playerWin",
+ ctrlCode: this.ctrl,
+ ctrlProperty: {
+ displayMode: ctrlType == "playback" ? 2 : 1,
+ splitNum: 1,
+ channelList: [{ channelId: item.videoCode }],
+ },
+ visible: true,
+ domId: this.domId,
+ },
+ ];
+ this.setPos();
+
+ // _this.ws.on("createCtrlResult", (res) => {
+ // console.warn(res);
+ // });
+
+ _this.ws
+ .createCtrl(params)
+ .then((res) => {
+ this.$message.success("鍒涘缓鎴愬姛");
+ console.log("res", res);
+ })
+ .catch((e) => {
+ console.log("error;", e);
+ });
+
+ if (ctrlType == "playback") {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+
+ let beginTime = _this.formatDate(start);
+ let endTime = _this.formatDate(end);
+ const params = [
+ {
+ ctrlCode: this.ctrl,
+ array: [
+ {
+ beginTime: beginTime,
+ endTime: endTime,
+ channelId: item.videoCode,
+ },
+ ],
+ },
+ ];
+ _this.ws.openCtrlRecord(params);
+ }
+ }, 1000);
+ },
+ destroy() {
+ // 璋冪敤閿�姣佹帶浠舵帴鍙�
+ if (!this.isLogin) {
+ this.$Message.info("姝e湪鐧婚檰瀹㈡埛绔紝璇风◢绛�......");
+ return false;
+ }
+ const ctrls = this.ws.ctrls.map((i) => {
+ if (i.ctrlCode === this.ctrl) {
+ return i.ctrlCode;
+ }
+ });
+ this.ws.destroyCtrl(ctrls);
+ },
+ setPos() {
+ let target = document.getElementById(this.domId);
+ console.log(target, "target");
+ target.style.right = `${this.crtPosX}px`;
+ target.style.top = `${this.crtPosY}px`;
+ target.style.width = `${this.crtWidth}px`;
+ target.style.height = `${this.crtHeight}px`;
+ if (document.createEvent) {
+ var event = document.createEvent("HTMLEvents");
+ event.initEvent("resize", true, true);
+ window.dispatchEvent(event);
+ } else if (document.createEventObject) {
+ window.fireEvent("onresize");
+ }
+ },
+
+ // 鏃堕棿鎴宠浆 yyyy-MM-dd HH:mm:ss
+ formatDate(inputTime) {
+ var date = new Date(inputTime);
+ var y = date.getFullYear();
+ var m = date.getMonth() + 1;
+ m = m < 10 ? "0" + m : m;
+ var d = date.getDate();
+ d = d < 10 ? "0" + d : d;
+ var h = date.getHours();
+ h = h < 10 ? "0" + h : h;
+ var minute = date.getMinutes();
+ var second = date.getSeconds();
+ minute = minute < 10 ? "0" + minute : minute;
+ second = second < 10 ? "0" + second : second;
+ return y + "-" + m + "-" + d + " " + h + ":" + minute + ":" + second;
+ },
+ resetAll() {
+ this.seachData = {};
+ },
},
beforeDestroy() {
- clearInterval(this.timer);
- this.timer = null;
+ clearInterval(this.timer);
+ this.timer = null;
},
+
+ props: ["info", "seachData"],
};
</script>
@@ -768,93 +685,93 @@
padding: 10px 20px;
.study-judge-header {
- line-height: 3vh;
+ line-height: 3vh;
}
.study-judge-main {
- .sjm-header {
- line-height: 8vh;
- display: flex;
- justify-content: space-between;
+ .sjm-header {
+ line-height: 8vh;
+ display: flex;
+ justify-content: space-between;
- .sjm-header-left {
- flex: 1;
- display: flex;
- justify-content: flex-start;
+ .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;
- }
- }
+ .moni-area {
+ margin-left: 4vw;
+ }
}
- .sjm-content {
- display: flex;
- justify-content: space-between;
+ .sjm-header-right {
+ flex: 1;
+ display: flex;
+ justify-content: flex-end;
- .sjm-content-left {
- line-height: 4.8vh;
- .count-data-span {
- cursor: pointer;
- color: #66b1ff;
- }
- .left-form > ::v-deep.el-form-item__label {
- font-size: 16px !important;
- }
- .img-item {
- display: flex;
- flex-direction: column;
- img {
- width: 15vw;
- height: 20vh;
- }
- }
-
- .img-item + .img-item {
- margin-top: 2vh;
- }
- }
- .sjm-content-center {
- width: calc(100% - 920px);
- }
- .sjm-content-right {
- .card-box {
- .but-live {
- padding-left: 48px;
- line-height: 4.8vh;
- }
- .card-header {
- padding-left: 48px;
- line-height: 4.8vh;
- }
- }
- }
+ .el-button {
+ padding: 0 1vw;
+ height: 4vh;
+ }
}
+ }
+
+ .sjm-content {
+ display: flex;
+ justify-content: space-between;
+
+ .sjm-content-left {
+ line-height: 4.8vh;
+ .count-data-span {
+ cursor: pointer;
+ color: #66b1ff;
+ }
+ .left-form > ::v-deep.el-form-item__label {
+ font-size: 16px !important;
+ }
+ .img-item {
+ display: flex;
+ flex-direction: column;
+ img {
+ width: 15vw;
+ height: 20vh;
+ }
+ }
+
+ .img-item + .img-item {
+ margin-top: 2vh;
+ }
+ }
+ .sjm-content-center {
+ width: calc(100% - 920px);
+ }
+ .sjm-content-right {
+ .card-box {
+ .but-live {
+ padding-left: 48px;
+ line-height: 4.8vh;
+ }
+ .card-header {
+ padding-left: 48px;
+ line-height: 4.8vh;
+ }
+ }
+ }
+ }
}
.el-form {
- ::v-deep .el-form-item {
- margin-bottom: 15px;
- }
+ ::v-deep .el-form-item {
+ margin-bottom: 15px;
+ }
- ::v-deep .el-form-item__label {
- color: #4b9bb7;
- }
+ ::v-deep .el-form-item__label {
+ color: #4b9bb7;
+ }
}
::v-deep .el-radio__label {
- color: #4b9bb7;
+ color: #4b9bb7;
}
}
diff --git a/src/views/intelligentPatrol/studyJudge/tablePage.vue b/src/views/intelligentPatrol/studyJudge/tablePage.vue
new file mode 100644
index 0000000..7b782bc
--- /dev/null
+++ b/src/views/intelligentPatrol/studyJudge/tablePage.vue
@@ -0,0 +1,332 @@
+<template>
+ <div class="mainContent">
+ <div class="header">
+ <el-form :inline="true" :model="seachData" class="demo-form-inline">
+ <el-form-item label="浜嬩欢绫诲瀷">
+ <el-cascader
+ v-model="seachData.gradeId"
+ :options="eventGradeOptions"
+ :props="options"
+ clearable
+ ></el-cascader>
+ </el-form-item>
+ <el-form-item label="鍙戠敓鐐逛綅">
+ <el-select v-model="seachData.videoId" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in videoOptions"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id"
+ ></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鎶ヨ鏃堕棿">
+ <el-date-picker
+ v-model="seachData.alarmTime"
+ type="daterange"
+ align="right"
+ unlink-panels
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ >
+ </el-date-picker>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="getInspectionData">鏌ヨ</el-button>
+ <el-button type="primary" @click="resetAll">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <!-- 鏁版嵁灞曠ず -->
+ <el-table
+ border
+ stripe
+ ref="multipleTable"
+ :header-cell-style="{
+ background: '#F5F5F5',
+ 'font-weight': '650',
+ 'line-height': '45px',
+ }"
+ :data="tableData"
+ style="width: 100%"
+ :row-class-name="tableRowClassName"
+ @selection-change="tableChange"
+ >
+ <el-table-column type="selection" min-width="5"> </el-table-column>
+ <el-table-column prop="code" label="鐐逛綅鍚嶇О" min-width="18">
+ <template slot-scope="scope">
+ <span>{{ scope.row.name || scope.row.address }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="eventSource" label="浜嬩欢绫诲瀷" min-width="8">
+ <template slot-scope="scope">
+ <span>{{ scope.row.algoName }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="alarmTime" label="鎶ヨ鏃堕棿" min-width="15">
+ <template slot-scope="scope">
+ <span>{{ filterTime(scope.row.alarmTime) }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="operation" label="鎿嶄綔" min-width="20">
+ <template slot-scope="scope">
+ <div class="operation">
+ <span @click="handleLearn(scope.row)">澶勭悊</span>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ <!-- tools -->
+ <div class="tools">
+ <div class="pagination">
+ <el-pagination
+ background
+ :current-page="currentPage"
+ layout="prev, pager, next"
+ :total="totalNum"
+ :page-size="pageSize"
+ @current-change="changeCurrentPage"
+ @prev-click="handlePrev"
+ @next-click="handleNext"
+ >
+ </el-pagination>
+ </div>
+ </div>
+ <!-- 鏂板 -->
+ <el-dialog
+ :visible.sync="dialogAdd"
+ width="90%"
+ title="棰勮鐮斿垽"
+ v-if="dialogAdd"
+ :before-close="handleClose"
+ >
+ <JudgeIndex :info="videoInspection" :seachData="seachData"></JudgeIndex>
+ </el-dialog>
+ </div>
+</template>
+
+ <script>
+import basecase from "@/api/operate/basecase";
+import videoPoint from "@/api/system/videoPoint";
+import helper from "@/utils/mydate";
+import { getTypeList } from "@/utils/helper";
+import JudgeIndex from "./index.vue";
+
+export default {
+ components: { JudgeIndex },
+ created() {
+ this.loadVideo();
+ this.loadEventGrade();
+ this.getInspectionData();
+ },
+ data() {
+ return {
+ dialogAdd: false,
+ preMyIdx: 0,
+ mystatus: 1,
+ tableData: [],
+ myIdx: 0,
+ totalNum: 0,
+ pageSize: 10,
+ currentPage: 1,
+ all: false,
+ unsame: false,
+ tempList: [],
+ eventGradeOptions: [],
+ videoOptions: [],
+ options: {
+ label: "name",
+ value: "id",
+ },
+ seachData: {},
+ videoInspection: {},
+ };
+ },
+ methods: {
+ loadVideo() {
+ videoPoint
+ .getVideoPointList({
+ current: 1,
+ size: 1000,
+ })
+ .then(({ records, total }) => {
+ this.videoOptions = records;
+ });
+ },
+ loadEventGrade() {
+ getTypeList("1", "02").then((result) => {
+ this.eventGradeOptions = result;
+ });
+ },
+ tableChange(list) {
+ this.tempList = [];
+ list.forEach((item) => {
+ this.tempList.push(item.id);
+ });
+ if (list.length === this.tableData.length) {
+ this.all = true;
+ } else {
+ this.all = false;
+ }
+ },
+
+ handlePrev(page) {
+ this.currentPage = page;
+ this.getInspectionData();
+ },
+ handleNext(page) {
+ this.currentPage = page;
+ this.getInspectionData();
+ },
+ changeCurrentPage(page) {
+ this.currentPage = page;
+ this.getInspectionData();
+ },
+ selectAll() {
+ this.$refs.multipleTable.toggleAllSelection();
+ },
+ disSame(list) {
+ list.forEach((row) => {
+ this.$refs.multipleTable.toggleRowSelection(row);
+ });
+ },
+ tableRowClassName({ row, rowIndex }) {
+ if ((rowIndex + 1) % 2 === 0) {
+ return "warning-row";
+ } else {
+ return "success-row";
+ }
+ },
+ getInspectionData() {
+ let data = {
+ current: this.currentPage,
+ pageSize: this.pageSize,
+ 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(data)
+ .then(({ records, total }) => {
+ this.tableData = records;
+ this.totalNum = total;
+ })
+ .catch((err) => this.$message.error(err));
+ },
+
+ filterTime(time) {
+ return helper(time);
+ },
+ handleLearn(row) {
+ this.dialogAdd = true;
+ this.videoInspection = row;
+
+ },
+ handleClose(done) {
+ this.changeCurrentPage(1);
+ done();
+ },
+ resetAll() {
+ this.seachData = {};
+ },
+ },
+};
+</script>
+
+ <style scoped lang="scss">
+.tools {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0 20px;
+
+ .funs-sp {
+ //border: 1px solid #DCDFE6;
+ }
+
+ .funs {
+ display: flex;
+
+ .funsItem {
+ border: 1px solid #dcdfe6;
+ line-height: 28px;
+ display: flex;
+ align-items: center;
+ border-radius: 4px;
+ font-size: 12px;
+ margin-left: 10px;
+
+ .el-checkbox {
+ width: 80px;
+ padding: 0 10px;
+ }
+
+ .el-select {
+ width: 120px;
+ }
+
+ &::v-deep .el-input__inner {
+ border: none;
+ // background-color: #09152f;
+ }
+
+ &:hover {
+ border: 1px solid #4b9bb7;
+ }
+
+ &:hover .el-checkbox {
+ color: #4b9bb7;
+ }
+ }
+ }
+
+ .pagination {
+ margin-top: 50px;
+ display: flex;
+ line-height: 50px;
+ justify-content: center;
+
+ .el-pagination {
+ &::v-deep li,
+ &::v-deep .btn-prev,
+ &::v-deep .btn-next {
+ // background-color: #071f39;
+ color: #4b9bb7;
+ }
+
+ &::v-deep .active {
+ background-color: #409eff;
+ color: #fff;
+ }
+ }
+ }
+}
+
+.el-table {
+ // color: #4b9bb7;
+ // font-size: 10px;
+
+ .operation {
+ display: flex;
+ color: var(--operation-color);
+ .line {
+ padding: 0 5px;
+ }
+
+ span:hover {
+ cursor: pointer;
+ }
+ }
+}
+
+.header {
+ line-height: normal;
+}
+</style>
+
\ No newline at end of file
--
Gitblit v1.8.0