From 4cd64e4d7330fdc0b13dfa5a0b7090a4fbb872bb Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期二, 01 十一月 2022 18:12:10 +0800
Subject: [PATCH] 视频巡查
---
src/views/operate/disposal/casepool/pool/index.vue | 257 ++++++++++++++++++++++++---------------------------
1 files changed, 120 insertions(+), 137 deletions(-)
diff --git a/src/views/operate/disposal/casepool/pool/index.vue b/src/views/operate/disposal/casepool/pool/index.vue
index f85ea4e..cd0bff0 100644
--- a/src/views/operate/disposal/casepool/pool/index.vue
+++ b/src/views/operate/disposal/casepool/pool/index.vue
@@ -24,11 +24,12 @@
</el-dialog>
<!-- 浜嬩欢鐧昏 -->
<el-dialog :before-close="handleClose" :visible.sync="dialogNewAdd"
- :title="newAddType === 0 ? '杩濊浜嬩欢鐧昏' : '杩濆缓浜嬩欢鐧昏' " width="60%" v-if="dialogNewAdd">
+ :title="newAddType === 0 ? '杩濊浜嬩欢鐧昏' : '杩濆缓浜嬩欢鐧昏' " width="80%" v-if="dialogNewAdd">
<!-- 杩濆缓鐧昏 -->
- <MyIll v-if="newAddType === 1" :mytype=newAddType @changeDialog=changeDialog />
+ <MyIll v-if="newAddType === 1" :refresh="getUserList" :mytype=newAddType
+ @changeDialog=changeDialog />
<!-- 杩濊鐧昏 -->
- <myVio v-else :mytype=newAddType @changeDialog=changeDialog />
+ <myVio v-else :refresh="getUserList" :mytype=newAddType @changeDialog=changeDialog />
</el-dialog>
</div>
</div>
@@ -51,30 +52,47 @@
@selection-change="tableChange">
<el-table-column type="selection" min-width="5">
</el-table-column>
- <el-table-column prop="code" label="浜嬩欢缂栧彿" min-width="10">
+ <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="10">
+ <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="category" label="澶х被鍚嶇О" min-width="10">
+ <el-table-column :prop="mystatus === 1 ? 'category' :'category'"
+ :label="mystatus===1 ? '澶х被鍚嶇О' : '杩濆缓绫诲埆'" :min-width="mystatus===1?'10':'15'">
</el-table-column>
- <el-table-column prop="type" label="灏忕被鍚嶇О" min-width="10">
+ <el-table-column :prop="mystatus === 1 ? 'type' :'site'" :label="mystatus===1 ? '灏忕被鍚嶇О' : '杩濆缓鍦扮偣'"
+ min-width="10">
</el-table-column>
- <el-table-column prop="actionCause" label="妗堢敱" min-width="10">
+ <!-- <el-table-column :prop="mystatus === 1 ? 'actionCause' :'communityId'"
+ :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="site" label="鎶ヨ鐐逛綅" min-width="10">
+ <el-table-column :prop="mystatus === 1 ? 'street' :'buildingArea'"
+ :label="mystatus===1 ? '鎵�灞炲尯鍩�' : '杩濇硶寤虹瓚闈㈢Н'" min-width="12">
</el-table-column>
- <el-table-column prop="streetId" label="鎵�灞炲尯鍩�" min-width="10">
+ <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="alarmTime" label="鎶ヨ鏃堕棿" min-width="10">
- </el-table-column>
- <el-table-column prop="continueTime" label="鎸佺画鏃堕棿" min-width="10">
+ <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">
+ <div class="operation" v-if="statusArr[0]===0">
<span @click="handleFind(scope.row)">涓婃姤</span>
<span class="line">|</span>
<span @click="handleDispatch(scope.row)">璋冨害</span>
@@ -83,30 +101,36 @@
<span class="line">|</span>
<span @click="handleNotDeal(scope.row)">鏆備笉澶勭悊</span>
</div>
+ <div class="operation" v-else>
+ <span @click="JumpView(scope.row)">鏌ョ湅</span>
+ </div>
</template>
</el-table-column>
</el-table>
<!-- 璇︽儏椤靛睍绀� -->
<el-dialog :visible.sync="dialogView" width="80%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogView"
:before-close="handleClose">
- <MyDetail :info=info></MyDetail>
+ <MyDetail :info=info v-if="mystatus==1 ? true:false"></MyDetail>
+ <MyIllDetail :info=info v-else></MyIllDetail>
</el-dialog>
<!-- 璋冨害 -->
<el-dialog :visible.sync="dialogDispatch" width="80%" title="璋冨害淇℃伅" v-if="dialogDispatch"
:before-close="handleClose">
- <MyDispatch :id="baseId" @changeDialog="changeDialog"></MyDispatch>
+ <MyDispatch :id="baseId" :mytype="mystatus" @changeDialog="changeDialog" :refresh="getUserList">
+ </MyDispatch>
</el-dialog>
<!-- tools -->
<div class="tools">
<div class="funs">
- <div class="funsItem">
- <el-checkbox v-model="all" @change="selectAll()">鍏ㄩ��</el-checkbox>
+ <div class="funsItem funs-sp">
+ <el-checkbox v-model="all" @change="selectAll()"
+ :disabled="tableData.length !== 0 ? false : true">鍏ㄩ��</el-checkbox>
</div>
- <div class="funsItem">
+ <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-select v-model="myIdx" placeholder="鎵归噺鎿嶄綔" @change="selectChange" disabled>
<el-option v-for="item in options" :key="item.value" :label="item.label"
:value="item.value" :disabled="item.disabled">
</el-option>
@@ -126,13 +150,15 @@
</template>
<script>
import MyDetail from '@/components/detail'
+import MyIllDetail from '@/components/illdetail'
import createUser from "./createUser"
import MyIll from './createUser/ill'
import MyVio from './createUser/vio'
import MyDispatch from '@/components/dispatch'
+import helper from '@/utils/mydate'
export default {
components: {
- createUser, MyIll, MyVio, MyDetail, MyDispatch
+ createUser, MyIll, MyVio, MyDetail, MyDispatch, MyIllDetail
},
data() {
return {
@@ -152,7 +178,7 @@
dialogCreate: false,
dialogView: false,
dialogNewAdd: false,
- dialogDispatch:false,
+ dialogDispatch: false,
newAddType: 0,
totalNum: null,
pageSize: 10,
@@ -221,9 +247,9 @@
checked: false,
},
],
- mystatus: '',
+ mystatus: 1,
statusArr: [],
- baseId:0
+ baseId: 0
}
},
@@ -267,7 +293,7 @@
.then(_ => {
this.$axios({
method: 'delete',
- url: 'sccg/base-case/batch_deletion?ids=' + idArr + '&type=' + statusArr[1],
+ url: 'sccg/base_case/batch_deletion?ids=' + idArr + '&type=' + statusArr[1],
}).then(res => {
if (res.code === 200) {
this.getUserList();
@@ -305,7 +331,7 @@
tableChange(list) {
this.tempList = [];
list.forEach(item => {
- this.tempList.push(item.code);
+ this.tempList.push(item.id);
})
if (list.length === this.tableData.length) {
this.all = true;
@@ -335,10 +361,10 @@
this.tableData = res.data.records;
console.log(res);
})
- .catch(err=>{
- console.log(err)
- this.tableData = [];
- })
+ .catch(err => {
+ console.log(err)
+ this.tableData = [];
+ })
},
// 璁剧疆琛ㄦ牸鏂戦┈绾�
tableRowClassName({ row, rowIndex }) {
@@ -369,12 +395,12 @@
this.currentPage = page;
this.getUserList();
},
- changeDialog(val) {
- this.dialogNewAdd = val.dialogView;
- this.dialogCreate = val.dialogView;
- this.dialogView = val.dialogView;
- this.dialogDispatch = val.dialogView;
- this.getUserList();
+ changeDialog({ flag }) {
+ this.dialogNewAdd = flag;
+ this.dialogCreate = flag;
+ this.dialogView = flag;
+ this.dialogDispatch = flag;
+ // this.getUserList();
},
handleClose(done) {
this.$confirm('纭鍏抽棴锛�')
@@ -396,6 +422,7 @@
item.checked = false;
}
})
+ this.mystatus = 1
this.typeList[0].checked = true;
this.typeList[1].checked = false;
this.statusArr[0] = this.tagList[idx].value;
@@ -426,67 +453,72 @@
url: `sccg/base_case/baseCaseDetail/${code}`
})
.then(res => {
+ console.log(res);
this.info = res.data;
this.dialogView = true;
})
},
// 鍦ㄥ涔�
- handleLearn({id}){
+ handleLearn({ id }) {
console.log(id);
this.$axios({
- method:'put',
- url:'sccg/base_case/case_status_update?caseId='+id + '&state='+3
+ method: 'put',
+ url: 'sccg/base_case/case_status_update?caseId=' + id + '&state=' + 3
})
- .then(res=>{
- console.log(res);
- if(res.code === 200){
- this.$notify({
- title:'娓╅Θ鎻愮ず',
- message:'姝や簨浠跺凡蹇界暐,杩斿洖绯荤粺鍦ㄥ涔�',
- type:'success',
- position: 'bottom-right'
- })
- // this.$message({
- // type:'success',
- // message:'鎿嶄綔鎴愬姛',
- // })
- this.getUserList();
- }else{
- this.$message({
- type:'error',
- message:'鎿嶄綔澶辫触'
- })
- }
- })
+ .then(res => {
+ console.log(res);
+ if (res.code === 200) {
+ this.$notify({
+ title: '娓╅Θ鎻愮ず',
+ message: '姝や簨浠跺凡蹇界暐,杩斿洖绯荤粺鍦ㄥ涔�',
+ type: 'success',
+ position: 'bottom-right'
+ })
+ // this.$message({
+ // type:'success',
+ // message:'鎿嶄綔鎴愬姛',
+ // })
+ this.getUserList();
+ } else {
+ this.$message({
+ type: 'error',
+ message: '鎿嶄綔澶辫触'
+ })
+ }
+ })
},
// 鏆備笉澶勭悊
- handleNotDeal({id}){
+ handleNotDeal({ id }) {
console.log(id);
this.$axios({
- method:'put',
- url:'sccg/base_case/case_status_update?caseId='+id + '&state='+4
+ method: 'put',
+ url: 'sccg/base_case/case_status_update?caseId=' + id + '&state=' + 4
})
- .then(res=>{
- console.log(res);
- if(res.code === 200){
- this.$notify({
- title:'娓╅Θ鎻愮ず',
- message:'姝や簨浠舵殏涓嶅鐞�,璇峰墠寰�鏆備笉澶勭悊鐣岄潰鏌ョ湅璇︽儏',
- type:'success',
- position: 'bottom-right'
- })
- // this.$message({
- // type:'success',
- // message:'鎿嶄綔鎴愬姛',
- // })
- this.getUserList();
- }else{
- this.$message({
- type:'error',
- message:'鎿嶄綔澶辫触'
- })
- }
- })
+ .then(res => {
+ console.log(res);
+ if (res.code === 200) {
+ this.$notify({
+ title: '娓╅Θ鎻愮ず',
+ message: '姝や簨浠舵殏涓嶅鐞�,璇峰墠寰�鏆備笉澶勭悊鐣岄潰鏌ョ湅璇︽儏',
+ type: 'success',
+ position: 'bottom-right'
+ })
+ // this.$message({
+ // type:'success',
+ // message:'鎿嶄綔鎴愬姛',
+ // })
+ this.getUserList();
+ } else {
+ this.$message({
+ type: 'error',
+ message: '鎿嶄綔澶辫触'
+ })
+ }
+ })
+ },
+ // 澶勭悊鏃堕棿
+ filterTime(time) {
+ return helper(time);
}
}
}
@@ -560,11 +592,6 @@
}
}
- &::v-deep .el-input__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
-
main {
background-color: #09152f;
margin-top: 20px;
@@ -627,11 +654,14 @@
.funs {
display: flex;
+ .funs-sp {
+ border: 1px solid #17324c;
+ }
+
.funsItem {
line-height: 28px;
display: flex;
align-items: center;
- border: 1px solid #17324c;
border-radius: 4px;
font-size: 12px;
margin-left: 10px;
@@ -643,11 +673,6 @@
.el-select {
width: 120px;
- }
-
- &::v-deep .el-input__inner {
- border: none;
- background-color: #09152f;
}
&:hover {
@@ -695,14 +720,6 @@
overflow: hidden;
}
- &::v-deep .el-table__empty-block {
- background-color: #09152f;
- }
-
- &::v-deep .el-table__empty-block {
- color: #4b9bb7;
- }
-
.operation {
display: flex;
@@ -716,40 +733,6 @@
}
}
- .el-table::v-deep .warning-row {
- background: #06122c;
- }
-
- .el-table::v-deep .success-row {
- background: #071f39;
- }
- }
-
- &::v-deep .el-dialog__header,
- &::v-deep .el-dialog__body {
- background-color: #06122c;
- }
-
- &::v-deep .el-dialog__header {
- display: flex;
- align-items: center;
- background-color: #fff;
- padding: 20px;
- line-height: 60px;
- }
-
- &::v-deep .el-dialog__title {
- color: #4b9bb7;
- }
-
- &::v-deep .el-dialog__close {
- width: 20px;
- height: 20px;
- // color: #fff;
- }
-
- &::v-deep .el-dialog__body {
- padding: 0;
}
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0