From cae7f403bb70f6c2752bedacbceb55e6f2c79891 Mon Sep 17 00:00:00 2001 From: odc.xiaohui <xiaohui@Q1> Date: 星期四, 15 十二月 2022 16:06:50 +0800 Subject: [PATCH] 2022-12-15 肖辉 智能巡查--预警研判 报警信息突出可点击,修改默认不弹出 --- src/views/intelligentPatrol/studyJudge/index.vue | 298 ++++++++++++++++++++++++++++++++--------------------------- 1 files changed, 163 insertions(+), 135 deletions(-) diff --git a/src/views/intelligentPatrol/studyJudge/index.vue b/src/views/intelligentPatrol/studyJudge/index.vue index 6b983fd..f10e22f 100644 --- a/src/views/intelligentPatrol/studyJudge/index.vue +++ b/src/views/intelligentPatrol/studyJudge/index.vue @@ -30,37 +30,40 @@ <!-- <span class="moni-area">{{ currentEvent.street }}</span>--> <!-- <span>{{ currentEvent.address }}</span>--> <!-- </div>--> - <span + <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-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" + 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 + >鎶ヨ鏃堕棿锛歿{ 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"> + 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> @@ -80,7 +83,7 @@ </div> <div class="sjm-content-center"> <div class="map"> - <MyMap></MyMap> + <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> @@ -88,20 +91,22 @@ <div class="card-box"> <div class="but-live"> <el-button size="small" @click="createVideo(currentEvent, 'live')" - >瀹炴椂棰勮</el-button + >瀹炴椂棰勮</el-button > - <el-button size="small" @click="createVideo(currentEvent, 'playback')" - >褰曞儚鍥炴斁</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" + ref="currentEvent" + label-width="120px" + :model="eventInfoData" + :rules="rules" > <!-- <el-form-item label="浜嬩欢缂栧彿:">--> <!-- <span>{{ currentEvent.code }}</span>--> @@ -120,82 +125,82 @@ <!-- </el-form-item>--> <el-form-item label="鍏宠仈搴楅摵" prop="store"> <el-select - v-model="eventInfoData.store" - clearable - @change="selectStoreChange" - placeholder="璇烽�夋嫨鍏宠仈搴楅摵" + v-model="eventInfoData.store" + clearable + @change="selectStoreChange" + placeholder="璇烽�夋嫨鍏宠仈搴楅摵" > <el-option - v-for="store in storeList" - :value="store.id" - :label="store.storeName" - :key="store.id" + 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> + 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 + :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" + v-model="eventInfoData.categoryId" + placeholder="璇烽�夋嫨澶х被鍚嶇О" + @change="categoryChange" > <el-option - v-for="category in categoryOptions" - :key="category.id" - :value="category.id" - :label="category.name" + 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="璇烽�夋嫨灏忕被鍚嶇О" + v-model="eventInfoData.typeId" + placeholder="璇烽�夋嫨灏忕被鍚嶇О" > <el-option - v-for="type in typeOptions" - :key="type.id" - :value="type.id" - :label="type.name" + 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="璇峰~鍐欒溅鐗屽彿鐮�" + 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" + 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 + :disabled="currentPage === 1" + @click="pageChange('prev')" + >涓婁竴鏉�</el-button > <el-button @click.native.prevent="handleConfirm" - >纭</el-button + >纭</el-button > <el-button @click="pageChange('next')">涓嬩竴鏉�</el-button> </el-form-item> @@ -206,22 +211,25 @@ </div> <el-dialog :visible="isShowDialog" title="璋冨害淇℃伅"> <MyDispatch - v-if="isShowDialog" - :mytype="1" - @getDispatchData="confirmInspection" - :isGetData="true" - @changeDialog="closeDialog" + 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" + :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> @@ -233,42 +241,42 @@ 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"; export default { - components: { MyDispatch, MyMap }, + components: { MyDispatch, MyMap,InspectionTable }, created() { this.getInspectionData(); this.initEventParams(); basecase - .getInspectionCountData() - .then((res) => { - this.countData = res; - }) - .catch((err) => this.$message.error(err)); + .getInspectionCountData() + .then((res) => { + this.countData = res; + }) + .catch((err) => this.$message.error(err)); getStoreInfoList({ current: 1, size: 100 }) - .then(({ list }) => { - this.storeList = list; - }) - .catch((err) => { - this.$message.error(err); - }); + .then(({ list }) => { + this.storeList = list; + }) + .catch((err) => { + this.$message.error(err); + }); baseInfo - .getCategoryList() - .then((res) => { - this.categoryOptions = res; - }) - .catch((err) => this.$message.error(err)); + .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)); + .getTypeList() + .then((res) => { + this.typeList = res; + }) + .catch((err) => this.$message.error(err)); }, mounted() { this.timer = setInterval(() => { @@ -288,6 +296,7 @@ } }; return { + isShowTable:false, timer: null, countData: { study: 0, @@ -359,9 +368,15 @@ domId: "dom1", ctrl: "ctrl1", playType: "live", + point: null, + mark: null, + zoom: null, }; }, methods: { + openDialogTable(){ + this.isShowTable = true + }, pageChange(type) { if (type === "next") { this.currentPage += 1; @@ -373,32 +388,38 @@ getInspectionData() { basecase - .getInspectionData({ current: this.currentPage }) - .then(({ records }) => { - this.currentEvent = records[0]; - 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)}灏忔椂`; - } - }) - .catch((err) => this.$message.error(err)); + .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)}灏忔椂`; + } + }) + .catch((err) => this.$message.error(err)); }, // 纭鐐瑰嚮浜嬩欢 @@ -441,13 +462,13 @@ 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)); + .confirmInspection({ ...eventParams, ...data }) + .then(() => { + this.$message.success("鎿嶄綔鎴愬姛"); + this.getInspectionData(); + this.initEventParams(); + }) + .catch((err) => this.$message.error(err)); }, closeDialog() { @@ -539,14 +560,14 @@ // }); _this.ws - .createCtrl(params) - .then((res) => { - this.$message.success("鍒涘缓鎴愬姛"); - console.log("res", res); - }) - .catch((e) => { - console.log("error;", e); - }); + .createCtrl(params) + .then((res) => { + this.$message.success("鍒涘缓鎴愬姛"); + console.log("res", res); + }) + .catch((e) => { + console.log("error;", e); + }); if (ctrlType == "playback") { const end = new Date(); @@ -668,8 +689,13 @@ .sjm-content-left { line-height: 4.8vh; - .left-form> ::v-deep.el-form-item__label{ - font-size: 16px!important; + .count-data-span{ + cursor: pointer; + color: blue; + } + .left-form > ::v-deep.el-form-item__label { + font-size: 16px !important; + } .img-item { display: flex; @@ -684,10 +710,12 @@ margin-top: 2vh; } } - + .sjm-content-center { + width: calc(100% - 920px); + } .sjm-content-right { .card-box { - .but-live{ + .but-live { padding-left: 48px; line-height: 4.8vh; } @@ -702,7 +730,7 @@ .el-form { ::v-deep .el-form-item { - margin-bottom: 5px; + margin-bottom: 15px; } ::v-deep .el-form-item__label { @@ -716,7 +744,7 @@ } .map { - height: 488px; + height: 100%; min-width: 460px; } </style> -- Gitblit v1.8.0