<template>
|
<div class="userList">
|
<header>
|
<div class="search">
|
<el-form :inline="true" :model="seachData">
|
<el-form-item label="事件编号">
|
<el-input v-model="seachData.code" placeholder="事件编号"></el-input>
|
</el-form-item>
|
<el-form-item>
|
<el-button type="primary" @click="getUserList">查询</el-button>
|
</el-form-item>
|
</el-form>
|
</div>
|
<div class="problem">
|
<div class="problem-title">问题类型</div>
|
<el-radio-group v-model="myproblem" @change="changeMyProblem">
|
<el-radio :label="1">违规</el-radio>
|
<el-radio :label="2">违建</el-radio>
|
</el-radio-group>
|
</div>
|
<div class="status">
|
<div class="status-title">审核状态</div>
|
<el-radio-group v-model="instatus" @change="changeInStatus">
|
<el-radio :label="7">待审核</el-radio>
|
<el-radio :label="8">已审核</el-radio>
|
<el-radio :label="9">已结案</el-radio>
|
</el-radio-group>
|
</div>
|
</header>
|
<main>
|
<div class="mainContent">
|
<!-- 数据展示 -->
|
<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">
|
<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="myproblem === 1 ? 'category' : 'category'" :label="myproblem === 1 ? '大类名称' : '违建类别'"
|
:min-width="myproblem === 1 ? '10' : '20'">
|
</el-table-column>
|
<el-table-column :prop="myproblem === 1 ? 'type' : 'site'" :label="myproblem === 1 ? '小类名称' : '违建地点'"
|
min-width="10">
|
</el-table-column>
|
<el-table-column :prop="myproblem === 1 ? 'actionCause' : 'communityId'"
|
:label="myproblem === 1 ? '案由' : '所属社区'" min-width="10">
|
</el-table-column>
|
<el-table-column :prop="myproblem === 1 ? 'site' : ''" :label="myproblem === 1 ? '报警点位' : '违法建筑长、宽、高'"
|
:min-width="myproblem === 1 ? '10' : '20'">
|
<template slot-scope="scope">
|
<div v-if="myproblem === 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="myproblem === 1 ? 'street' : 'buildingArea'"
|
:label="myproblem === 1 ? '所属区域' : '违法建筑面积'" min-width="10">
|
</el-table-column>
|
<el-table-column prop="alarmTime" label="报警时间" min-width="15" v-if="myproblem === 1">
|
<template slot-scope="scope">
|
<span>{{ filterTime(scope.row.alarmTime) }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column :prop="myproblem === 1 ? 'continueTime' : 'materials'"
|
:label="myproblem === 1 ? '持续时间' : '违法建筑材料'" min-width="15">
|
</el-table-column>
|
<el-table-column prop="operation" label="操作" min-width="15">
|
<template slot-scope="scope">
|
<div class="btn">
|
<!-- v-if="instatus===7 ? true : false" -->
|
<span style=" color: #2f54eb;" @click="handleExamine(scope.row)" v-if="instatus === 7">审核</span>
|
<span @click="handleClosure(scope.row)" v-if="instatus === 8">结案</span>
|
<span class="line" v-if="instatus !== 9">|</span>
|
<span @click="JumpView(scope.row)">查看</span>
|
</div>
|
</template>
|
</el-table-column>
|
</el-table>
|
<!-- 审核页面 -->
|
<el-dialog :visible.sync="dialogExamine" width="60%" title="基础信息(人工)" v-if="dialogExamine"
|
:before-close="handleClose">
|
<MyExamine :info="info" v-if="myproblem === 1" @closeDialog="closeDialog"></MyExamine>
|
<MyIllExamine :info="info" v-else @closeDialog="closeDialog"></MyIllExamine>
|
</el-dialog>
|
<!-- 结案页面 -->
|
<el-dialog :visible.sync="dialogClosure" width="60%" title="基础信息(人工)" v-if="dialogClosure"
|
:before-close="handleClose">
|
<MyClosure :info="info" v-if="myproblem === 1" @closeDialog="closeDialog"></MyClosure>
|
<MyIllClosure :info="info" v-else @closeDialog="closeDialog"></MyIllClosure>
|
</el-dialog>
|
<!-- 详情页面 -->
|
<el-dialog :visible.sync="dialogView" width="60%" title="基础信息(人工)" v-if="dialogView"
|
:before-close="handleNoClose">
|
<MyDetail :info="info" v-if="myproblem === 1" :mycode="code"></MyDetail>
|
<MyIllDetail :info="info" v-else :mycode="code"></MyIllDetail>
|
</el-dialog>
|
<!-- 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-button type="primary" @click="mulCheck()">批量通过</el-button>
|
<!-- <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>
|
</main>
|
</div>
|
</template>
|
<script>
|
import MyExamine from "./components/examine";
|
import MyClosure from "./components/closure";
|
import MyIllExamine from "./components/illExamine";
|
import MyIllClosure from "./components/illclosure";
|
import MyDetail from "@/components/detail";
|
import MyIllDetail from "@/components/illdetail";
|
import helper from "@/utils/mydate";
|
export default {
|
components: {
|
MyExamine,
|
MyClosure,
|
MyDetail,
|
MyIllDetail,
|
MyIllExamine,
|
MyIllClosure,
|
},
|
data() {
|
return {
|
seachData: {
|
code: "",
|
},
|
tableData: [],
|
dialogExamine: false,
|
dialogClosure: false,
|
dialogView: false,
|
info: {},
|
totalNum: null,
|
pageSize: 10,
|
currentPage: 1,
|
all: false,
|
unsame: false,
|
myIdx: 0,
|
preMyIdx: 0,
|
options: [
|
{
|
value: 0,
|
label: "批量操作",
|
disabled: true,
|
},
|
{
|
value: 1,
|
label: "批量审核",
|
}
|
],
|
tempList: [],
|
typeList: [
|
{
|
name: "违规",
|
value: 1,
|
checked: true,
|
},
|
{
|
name: "违建",
|
value: 2,
|
checked: false,
|
},
|
],
|
caseId: "",
|
myproblem: 1,
|
instatus: 7,
|
code: "",
|
};
|
},
|
created() {
|
this.getUserList();
|
},
|
methods: {
|
// 批量审核
|
checkData(idArr) {
|
var url = ""
|
if (this.instatus === 8) {
|
url = "sccg/base_case/end_case_batch"
|
}
|
if (this.instatus === 7) {
|
url = "sccg/check_handle/check_batch"
|
}
|
if(url.length>0){
|
this.$axios({
|
method: 'post',
|
url: url,
|
data: {
|
ids: idArr
|
}
|
})
|
.then(res => {
|
if (res.code === 200) {
|
|
this.currentPage = 0;
|
this.getUserList();
|
this.$message({
|
message: res.message,
|
type: res.code === 200 ? "success" : "warning",
|
});
|
}
|
});
|
}
|
},
|
|
// 执行下拉框操作
|
mulCheck() {
|
if (this.tempList.length !== 0) {
|
this.checkData(this.tempList);
|
} else {
|
this.$message({
|
type: "warning",
|
message: "您还没选中任何数据",
|
});
|
}
|
},
|
// 监听表格
|
tableChange(list) {
|
this.tempList = [];
|
list.forEach((item) => {
|
this.tempList.push(item.id);
|
});
|
this.all = list.length === this.tableData.length;
|
},
|
// 全选
|
selectAll() {
|
this.$refs.multipleTable.toggleAllSelection();
|
},
|
// 反选
|
disSame(list) {
|
list.forEach((row) => {
|
this.$refs.multipleTable.toggleRowSelection(row);
|
});
|
},
|
// 删除单条数据
|
handleDelete({ number }) {
|
this.$confirm("确认删除?")
|
.then((_) => {
|
this.$axios({
|
method: "delete",
|
url: `sccg/violations/delete?id=${number}`,
|
}).then((res) => {
|
this.$message({
|
type: res.code === 200 ? "success" : "warning",
|
message: res.message,
|
});
|
|
this.getUserList();
|
});
|
})
|
.catch((_) => { });
|
},
|
// 获取用户列表
|
getUserList() {
|
if (this.seachData.code.length > 0) {
|
this.instatus = -1
|
}
|
else if(this.instatus == -1){
|
this.instatus = 7
|
}
|
const { currentPage, pageSize, instatus, myproblem, seachData } = this;
|
|
this.$axios({
|
method: "get",
|
url: `sccg/base_case/query?state=${instatus}¤t=${currentPage}&size=${pageSize}&type=${myproblem}&code=${seachData.code}`,
|
}).then((res) => {
|
this.totalNum = res.data.total;
|
this.tableData = res.data.records;
|
});
|
},
|
// 设置表格斑马纹
|
tableRowClassName({ row, rowIndex }) {
|
if ((rowIndex + 1) % 2 === 0) {
|
return "warning-row";
|
} else {
|
return "success-row";
|
}
|
},
|
// 当前页改变触发事件
|
changeCurrentPage(page) {
|
this.currentPage = page;
|
this.getUserList();
|
},
|
// 上一页点击事件
|
handlePrev(page) {
|
this.currentPage = page;
|
this.getUserList();
|
},
|
// 下一页点击事件
|
handleNext(page) {
|
this.currentPage = page;
|
this.getUserList();
|
},
|
handleClose(done) {
|
this.$confirm("确认关闭?")
|
.then((_) => {
|
this.dialogExamine = false;
|
done();
|
})
|
.catch((_) => { });
|
},
|
handleNoClose(done) {
|
done();
|
},
|
async JumpView(data) {
|
this.code = data.code;
|
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;
|
});
|
},
|
// 获取案件信息
|
getEventInfo3(code) {
|
this.$axios({
|
method: "get",
|
url: `sccg/base_case/baseCaseDetail/${code}`,
|
}).then((res) => {
|
this.info = res.data;
|
this.dialogExamine = true;
|
});
|
},
|
// 获取案件信息
|
getEventInfo2(code) {
|
this.$axios({
|
method: "get",
|
url: `sccg/base_case/baseCaseDetail/${code}`,
|
}).then((res) => {
|
this.info = res.data;
|
this.dialogClosure = true;
|
});
|
},
|
// 去审核
|
handleExamine({ code }) {
|
this.getEventInfo3(code);
|
},
|
// 去结案
|
handleClosure({ code }) {
|
this.getEventInfo2(code);
|
},
|
// 关闭dialog
|
closeDialog({ flag }) {
|
this.dialogExamine = flag;
|
this.dialogClosure = flag;
|
this.getUserList();
|
},
|
// 问题类型
|
changeMyProblem(val) {
|
this.seachData.code = '';
|
this.currentPage = 0;
|
this.getUserList();
|
},
|
// 审核状态
|
changeInStatus(val) {
|
this.seachData.code = '';
|
this.currentPage = 0;
|
this.getUserList();
|
},
|
filterTime(time) {
|
return helper(time);
|
},
|
},
|
};
|
</script>
|
<style lang="scss" scoped>
|
.search {
|
line-height: 20px;
|
}
|
|
.userList {
|
text-align: left;
|
padding: 5px 10px;
|
// color: #4b9bb7;
|
border: 1px solid #ccc;
|
|
header {
|
// background-color: #09152f;
|
//padding: 10px 20px;
|
|
.problem,
|
.status {
|
display: flex;
|
align-items: center;
|
line-height: 30px;
|
}
|
|
.problem-title,
|
.status-title {
|
margin-right: 20px;
|
}
|
}
|
|
&::v-deep .el-input__inner {
|
// background-color: #09152f;
|
// border: 1px solid #17324c;
|
line-height: 30px;
|
}
|
|
&::v-deep .el-form-item {
|
margin-bottom: 5px;
|
}
|
|
main {
|
// background-color: #09152f;
|
margin-top: 10px;
|
padding-bottom: 50px;
|
|
.btn span:hover {
|
cursor: pointer;
|
}
|
|
.tools {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
|
//padding: 0 20px;
|
.funs {
|
display: flex;
|
|
.funs-first {
|
margin-left: 0 !important;
|
}
|
|
.funs-sp {
|
border: 1px solid #dcdfe6;
|
}
|
|
.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 {}
|
}
|
}
|
|
.el-table {
|
// color: #4b9bb7;
|
// font-size: 10px;
|
|
&::v-deep .cell {
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
overflow: hidden;
|
}
|
|
// &::v-deep .el-table__empty-block {
|
// background-color: #09152f;
|
// }
|
|
&::v-deep .el-table__empty-block {
|
color: #4b9bb7;
|
}
|
|
.operation {
|
display: flex;
|
|
.line {
|
padding: 0 5px;
|
}
|
|
color: var(--operation-color);
|
|
span:hover {
|
cursor: pointer;
|
}
|
}
|
}
|
|
// .el-table::v-deep .warning-row {
|
// background: #06122c;
|
// }
|
|
// .el-table::v-deep .success-row {
|
// background: #071f39;
|
// }
|
|
&::v-deep .switchStyle .el-switch__label {
|
position: absolute;
|
display: none;
|
color: #fff;
|
}
|
|
&::v-deep .el-switch__core {
|
background-color: rgba(166, 166, 166, 1);
|
}
|
|
&::v-deep .switchStyle .el-switch__label--left {
|
z-index: 9;
|
left: 20px;
|
}
|
|
&::v-deep .switchStyle .el-switch__label--right {
|
z-index: 9;
|
left: 4px;
|
}
|
|
&::v-deep .switchStyle .el-switch__label.is-active {
|
display: block;
|
}
|
|
&::v-deep .switchStyle.el-switch .el-switch__core,
|
&::v-deep .el-switch .el-switch__label {
|
width: 50px !important;
|
}
|
}
|
|
.line {
|
padding: 0 5px;
|
}
|
|
&::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>
|