From 02ce22be65df8b717d5f1614e5d7dbfcdf1ce1b9 Mon Sep 17 00:00:00 2001 From: Oliver <1070107765@qq.com> Date: 星期三, 14 十二月 2022 09:29:51 +0800 Subject: [PATCH] 预警研判 操作 --- src/views/intelligentPatrol/studyJudge/inspectionTable/index.vue | 389 +++++++++++++++++++++++++++++++++++++++++++ src/views/intelligentPatrol/studyJudge/index.vue | 135 ++++++++------ 2 files changed, 463 insertions(+), 61 deletions(-) diff --git a/src/views/intelligentPatrol/studyJudge/index.vue b/src/views/intelligentPatrol/studyJudge/index.vue index c71e937..e19e9d6 100644 --- a/src/views/intelligentPatrol/studyJudge/index.vue +++ b/src/views/intelligentPatrol/studyJudge/index.vue @@ -2,7 +2,7 @@ <div class="study-judge"> <div class="study-judge-header"> <span - >鎮ㄦ湁{{ countData.review }}鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{ + >鎮ㄦ湁<span @click="openDialogTable">{{ countData.review }}</span>鏉″緟瀹℃牳鎶ヨ淇℃伅,浠婃棩绔嬫{{ countData.register }}鏉�,鍐嶅涔爗{ countData.study }}鏉�</span > @@ -16,28 +16,30 @@ </div> <div class="sjm-header-right"> <el-button size="small" @click="createVideo(currentEvent, 'live')" - >瀹炴椂棰勮</el-button + >瀹炴椂棰勮 + </el-button > <el-button size="small" @click="createVideo(currentEvent, 'playback')" - >褰曞儚鍥炴斁</el-button + >褰曞儚鍥炴斁 + </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" + class="img-item" + v-for="(item, index) in imageList" + :key="item.id" > <span>鎶ヨ鍥剧墖</span> - <img :src="item" /> + <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" /> + <img :src="item"/> </div> </div> <div class="sjm-content-center"> @@ -52,10 +54,10 @@ <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> @@ -74,82 +76,85 @@ </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> @@ -160,22 +165,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> @@ -187,11 +195,12 @@ 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(); @@ -242,12 +251,13 @@ } }; return { - timer: null, + timer:null, countData: { study: 0, review: 0, register: 0, }, + isShowTable: true, currentEvent: {}, stateList: [ { @@ -316,6 +326,9 @@ }; }, methods: { + openDialogTable(){ + this.isShowTable = true + }, pageChange(type) { if (type === "next") { this.currentPage += 1; @@ -574,7 +587,7 @@ beforeDestroy() { clearInterval(this.timer); this.timer = null; - }, + } }; </script> diff --git a/src/views/intelligentPatrol/studyJudge/inspectionTable/index.vue b/src/views/intelligentPatrol/studyJudge/inspectionTable/index.vue new file mode 100644 index 0000000..e4f3a21 --- /dev/null +++ b/src/views/intelligentPatrol/studyJudge/inspectionTable/index.vue @@ -0,0 +1,389 @@ +<template> + <div class="mainContent"> + <!-- 鏁版嵁灞曠ず --> + <el-table ref="multipleTable" + :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','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"> + <el-link @click="JumpView(scope.row)">{{ scope.row.code }}</el-link> + </template> + </el-table-column> + <el-table-column prop="eventSource" label="闂鏉ユ簮" min-width="8"> + <template slot-scope="scope"> + <span>{{ scope.row.eventSource === 2 ? '瑙嗛涓婁紶' : '浜哄伐涓婁紶' }}</span> + </template> + </el-table-column> + <el-table-column :prop="mystatus === 1 ? 'category' :'category'" + :label="mystatus===1 ? '澶х被鍚嶇О' : '杩濆缓绫诲埆'" :min-width="mystatus===1?'10':'15'"> + </el-table-column> + <el-table-column :prop="mystatus === 1 ? 'type' :'site'" :label="mystatus===1 ? '灏忕被鍚嶇О' : '杩濆缓鍦扮偣'" + min-width="10"> + </el-table-column> + <el-table-column :prop="mystatus === 1 ? 'site' :''" :label="mystatus===1 ? '鎶ヨ鐐逛綅' : '杩濇硶寤虹瓚闀裤�佸銆侀珮'" + :min-width="mystatus===1?'10' :'20' "> + <template slot-scope="scope"> + <div v-if="mystatus ===2"><span>{{ + scope.row.buildingLength + '绫�' + '銆�' + + scope.row.buildingWidth + '绫�' + '銆�' + scope.row.buildingHigh + '绫�' + }}</span></div> + <div v-else>{{ scope.row.site }}</div> + </template> + </el-table-column> + <el-table-column :prop="mystatus === 1 ? 'street' :'buildingArea'" + :label="mystatus===1 ? '鎵�灞炲尯鍩�' : '杩濇硶寤虹瓚闈㈢Н'" min-width="12"> + </el-table-column> + <el-table-column prop="alarmTime" label="鎶ヨ鏃堕棿" min-width="15" v-if="mystatus===1"> + <template slot-scope="scope"> + <span>{{ filterTime(scope.row.alarmTime) }}</span> + </template> + </el-table-column> + <el-table-column :prop="mystatus === 1 ? 'continueTime' :'materials'" + :label="mystatus===1 ? '鎸佺画鏃堕棿' : '杩濇硶寤虹瓚鏉愭枡'" min-width="12"> + </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> + <span class="line">|</span> + <span @click="handleNotDeal(scope.row)">鏆備笉澶勭悊</span> + </div> + </template> + </el-table-column> + </el-table> + <!-- tools --> + <div class="tools"> + <div class="funs"> + <div class="funsItem funs-sp"> + <el-checkbox v-model="all" @change="selectAll()" + >鍏ㄩ�� + </el-checkbox + > + </div> + <div class="funsItem funs-sp"> + <el-checkbox v-model="unsame" @change="disSame(tableData)" + >鍙嶉�� + </el-checkbox + > + </div> + <div class="funsItem"> + <el-select + v-model="myIdx" + placeholder="鎵归噺鎿嶄綔" + @change="selectChange" + > + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + :disabled="item.disabled" + > + </el-option> + </el-select> + </div> + </div> + <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> + </div> +</template> + +<script> +import basecase from "@/api/operate/basecase"; +import helper from '@/utils/mydate' + +export default { + created() { + this.getInspectionData() + }, + data() { + return { + preMyIdx: 0, + mystatus: 1, + tableData: [], + myIdx: 0, + options: [ + { + value: 0, + label: "鎵归噺鎿嶄綔", + disabled: true, + }, + { + value: 3, + label: "鎵归噺鍦ㄥ涔�", + }, + { + value: 4, + label: "鎵归噺鏆備笉澶勭悊", + }, + ], + totalNum: 0, + pageSize: 10, + currentPage: 1, + all: false, + unsame: false, + tempList:[] + } + }, + methods: { + 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; + } + }, + selectChange(list) { + if (this.tempList.length !== 0) { + if (list === 3) { + this.preMyIdx = list; + this.mulHandler(this.tempList, list); + } + if (list === 4) { + this.preMyIdx = list; + this.mulHandler(this.tempList, list); + } + } else { + this.myIdx = this.preMyIdx; + this.$message({ + type: "warning", + message: "鎮ㄨ繕娌¢�変腑浠讳綍鏁版嵁", + }); + } + }, + mulHandler(ids, option) { + console.log("whj", ids, option) + console.log(this.options.filter(x => x.value === option)) + const tag = this.options.filter(x => x.value === option)[0].label + if (option === 3) { + this.$confirm(`鎮ㄧ‘瀹氳${tag}鍚�?`) + .then((_) => { + + }) + .catch((err) => { + console.log(err); + }); + } else if (option === 4) { + this.$confirm(`鎮ㄧ‘瀹氳${tag}鍚�?`) + .then((_) => { + + }) + .catch((err) => { + console.log(err); + }); + } + }, + 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() { + const params = { + current: this.currentPage, + size: this.pageSize, + state: 1, + resource: 1, + type: 1 + } + basecase + .baseCasePoolList(params) + .then(({records, total}) => { + this.tableData = records; + this.totalNum = total; + }) + .catch(err => this.$message.error(err)) + }, + async JumpView(data) { + await this.getEventInfo(data.code); + }, + // 鑾峰彇妗堜欢淇℃伅 + getEventInfo(code) { + this.$axios({ + method: 'get', + url: `sccg/base_case/baseCaseDetail/${code}` + }) + .then(res => { + this.info = res.data; + this.dialogView = true; + }) + }, + filterTime(time) { + return helper(time); + }, + handleLearn({id}) { + this.$axios({ + method: 'put', + url: 'sccg/base_case/case_status_update?caseId=' + id + '&state=' + 3 + }) + .then(res => { + if (res.code === 200) { + this.$notify({ + title: '娓╅Θ鎻愮ず', + message: '姝や簨浠跺凡蹇界暐,杩斿洖绯荤粺鍦ㄥ涔�', + type: 'success', + position: 'bottom-right' + }) + this.getInspectionData(); + } else { + this.$message({ + type: 'error', + message: '鎿嶄綔澶辫触' + }) + } + }) + }, + // 鏆備笉澶勭悊 + handleNotDeal({id}) { + this.$axios({ + method: 'put', + url: 'sccg/base_case/case_status_update?caseId=' + id + '&state=' + 4 + }) + .then(res => { + if (res.code === 200) { + this.$notify({ + title: '娓╅Θ鎻愮ず', + message: '姝や簨浠舵殏涓嶅鐞�,璇峰墠寰�鏆備笉澶勭悊鐣岄潰鏌ョ湅璇︽儏', + type: 'success', + position: 'bottom-right' + }) + this.getInspectionData(); + } else { + this.$message({ + type: 'error', + message: '鎿嶄綔澶辫触' + }) + } + }) + }, + } +} +</script> + +<style scoped lang="scss"> + +.tools { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 20px; + + .funs-sp { + border: 1px solid #17324c; + } + + .funs { + display: flex; + + .funsItem { + 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; + + .line { + padding: 0 5px; + } + + span:hover { + cursor: pointer; + } + } +} + +</style> -- Gitblit v1.8.0