From e1cd9b58eafba52b91e7492c4aa4f3f015b541ec Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期四, 24 十一月 2022 11:26:45 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_ui into master
---
src/views/operate/viewEvent/index.vue | 188 +++++++++++++++++-----------------------------
1 files changed, 71 insertions(+), 117 deletions(-)
diff --git a/src/views/operate/viewEvent/index.vue b/src/views/operate/viewEvent/index.vue
index fea39e0..162b08a 100644
--- a/src/views/operate/viewEvent/index.vue
+++ b/src/views/operate/viewEvent/index.vue
@@ -6,44 +6,44 @@
<div class="contentItem">
<span>鎸夌紪鍙�: </span>
<div>
- <el-input placeholder=" 璇疯緭鍏ョ紪鍙�" v-model="info.code"></el-input>
+ <el-input placeholder=" 璇疯緭鍏ョ紪鍙�" v-model="searchData.number"></el-input>
</div>
</div>
<div class="contentItem">
<span>鎸夌被鍨�: </span>
<div class="search">
- <el-input placeholder=" 璇疯緭鍏ョ紪鍙�" v-model="info.type"></el-input>
+ <el-input placeholder=" 璇疯緭鍏ョ被鍨�" v-model="searchData.categories"></el-input>
</div>
</div>
<div class="contentItem">
<span>鎸夌ぞ鍖�: </span>
<div class="search">
- <el-input placeholder=" 璇疯緭鍏ョ紪鍙�" v-model="info.community"></el-input>
+ <el-input placeholder=" 璇疯緭鍏ョぞ鍖�" v-model="searchData.communityId"></el-input>
</div>
</div>
<div class="contentItem">
<span>鎸変簨鍙戝湴鐐�: </span>
<div class="search">
- <el-input placeholder=" 璇疯緭鍏ョ紪鍙�" v-model="info.site"></el-input>
+ <el-input placeholder=" 璇疯緭鍏ヤ簨鍙戝湴鐐�" v-model="searchData.site"></el-input>
</div>
</div>
<div class="date-search contentItem">
<div class="btn">
- <el-button icon="el-icon-plus" type="primary">鎼滅储</el-button>
+ <el-button icon="el-icon-plus" categories="primary" @click="getList">鎼滅储</el-button>
</div>
</div>
</div>
<div class="headerContent">
<span>鏃堕棿: </span>
- <div>
- <el-input placeholder=" 璇疯緭鍏ュ紑濮嬫椂闂�" v-model="info.startTime"></el-input>
- </div>
- <div class="line">
- --
- </div>
- <div>
- <el-input placeholder=" 璇疯緭鍏ョ粨鏉熸椂闂�" v-model="info.endTime"></el-input>
- </div>
+ <el-date-picker
+ v-model="datepick"
+ type="daterange"
+ @change="datepickChange"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡">
+ </el-date-picker>
</div>
</header>
<main>
@@ -53,11 +53,11 @@
: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 categories="selection" min-width="5">
</el-table-column>
- <el-table-column prop="code" label="浜嬩欢缂栧彿" min-width="18">
+ <el-table-column prop="id" label="浜嬩欢缂栧彿" min-width="18">
<template slot-scope="scope">
- <el-link @click="JumpView(scope.row)">{{ scope.row.code }}</el-link>
+ <el-link @click="JumpView(scope.row)">{{ scope.row.id }}</el-link>
</template>
</el-table-column>
<el-table-column prop="eventSource" label="闂鏉ユ簮" min-width="8">
@@ -68,7 +68,7 @@
<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'"
+ <el-table-column :prop="myproblem === 1 ? 'categories' : 'site'"
:label="myproblem === 1 ? '灏忕被鍚嶇О' : '杩濆缓鍦扮偣'" min-width="10">
</el-table-column>
<el-table-column :prop="myproblem === 1 ? 'actionCause' : 'communityId'"
@@ -96,22 +96,22 @@
</el-table-column>
</el-table>
<!-- 瀹℃牳椤甸潰 -->
- <el-dialog :visible.sync="dialogExamine" width="80%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogExamine"
+ <el-dialog :visible.sync="dialogExamine" width="80%" title="鍩虹淇℃伅(浜哄伐)"
: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="80%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogClosure"
+ <el-dialog :visible.sync="dialogClosure" width="80%" title="鍩虹淇℃伅(浜哄伐)"
: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="80%" title="鍩虹淇℃伅(浜哄伐)" v-if="dialogView"
+ <el-dialog :visible.sync="dialogView" width="80%" title="鍩虹淇℃伅(浜哄伐)"
:before-close="handleNoClose">
- <MyDetail :info=info v-if="myproblem === 1" :mycode='code'></MyDetail>
- <MyIllDetail :info=info v-else :mycode="code"></MyIllDetail>
+ <MyDetail :info=info v-if="myproblem === 1" :mycode='number'></MyDetail>
+ <MyIllDetail :info=info v-else :mycode="number"></MyIllDetail>
</el-dialog>
<!-- tools -->
<div class="tools">
@@ -132,8 +132,7 @@
</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">
+ :total="totalNum" :page-size="pageSize" @current-change="changeCurrentPage">
</el-pagination>
</div>
</div>
@@ -149,12 +148,15 @@
import MyDetail from '@/components/detail'
import MyIllDetail from '@/components/illdetail'
import helper from '@/utils/mydate'
+import casequery from "@/api/operate/casequery";
+
export default {
components: {
MyExamine, MyClosure, MyDetail, MyIllDetail, MyIllExamine, MyIllClosure
},
data() {
return {
+ datepick: null,
tableData: [],
dialogExamine: false,
dialogClosure: false,
@@ -202,30 +204,36 @@
caseId: '',
myproblem: 1,
instatus: 7,
- code: ''
+ number: '',
+ searchData: {
+ categories: null,
+ number: null,
+ communityId: null,
+ endTime: null,
+ site: null,
+ startTime: null
+ }
}
},
created() {
- this.getUserList();
+ this.getList();
},
methods: {
// 鎵归噺鍒犻櫎
mulDelete(idArr) {
- console.log(idArr);
this.$axios({
method: 'delete',
url: 'sccg/violations/batch_delete?ids=' + idArr,
}).then(res => {
- this.getUserList();
+ this.getList();
this.$message({
message: res.message,
- type: res.code === 200 ? 'success' : 'warning'
+ categories: res.number === 200 ? 'success' : 'warning'
})
})
},
// 鎵ц涓嬫媺妗嗘搷浣�
selectChange(list) {
- console.log(this.tempList);
if (this.tempList.length !== 0) {
if (list === 3) {
this.preMyIdx = list;
@@ -234,7 +242,7 @@
} else {
this.myIdx = this.preMyIdx;
this.$message({
- type: 'warning',
+ categories: 'warning',
message: '鎮ㄨ繕娌¢�変腑浠讳綍鏁版嵁',
})
}
@@ -243,13 +251,9 @@
tableChange(list) {
this.tempList = [];
list.forEach(item => {
- this.tempList.push(item.code);
+ this.tempList.push(item.number);
})
- if (list.length === this.tableData.length) {
- this.all = true;
- } else {
- this.all = false
- }
+ this.all = list.length === this.tableData.length;
},
// 鍏ㄩ��
selectAll() {
@@ -263,61 +267,50 @@
},
// 鍒犻櫎鍗曟潯鏁版嵁
handleDelete({ number }) {
- console.log(number);
this.$confirm('纭鍒犻櫎锛�')
.then(_ => {
- console.log(1);
this.$axios({
method: 'delete',
url: `sccg/violations/delete?id=${number}`,
})
.then(res => {
- console.log(res);
this.$message({
- type: res.code === 200 ? 'success' : 'warning',
+ categories: res.number === 200 ? 'success' : 'warning',
message: res.message
})
- this.getUserList();
+ this.getList();
})
})
.catch(_ => { console.log(2) });
},
- // 鑾峰彇鐢ㄦ埛鍒楄〃
- getUserList() {
- const { currentPage, pageSize, instatus, myproblem } = this;
- this.$axios({
- method: 'get',
- url: `sccg/base_case/query?state=${instatus}¤t=${currentPage}&size=${pageSize}&resource=2&type=${myproblem}`
- }).then(res => {
- this.totalNum = res.data.total;
- this.tableData = res.data.records;
- })
+ // 鑾峰彇鍒楄〃
+ getList() {
+ casequery.baseCaseQuery({ current: this.currentPage, pageSize: this.pageSize, ...this.searchData })
+ .then((res) => {
+ this.tableData = res;
+ })
+ .catch(err => this.$message({ type: 'error', message: err }))
},
// 璁剧疆琛ㄦ牸鏂戦┈绾�
tableRowClassName({ row, rowIndex }) {
- if ((rowIndex + 1) % 2 == 0) {
+ if ((rowIndex + 1) % 2 === 0) {
return 'warning-row';
} else {
return 'success-row';
}
- return '';
},
// 褰撳墠椤垫敼鍙樿Е鍙戜簨浠�
changeCurrentPage(page) {
this.currentPage = page;
- this.getUserList();
+ this.getList();
},
- // 涓婁竴椤电偣鍑讳簨浠�
- handlePrev(page) {
- this.currentPage = page;
- this.getUserList();
+
+ datepickChange() {
+ this.searchData.startTime = this.datepick[0];
+ this.searchData.endTime = this.datepick[1].replace('00:00:00', '23:59:59');
},
- // 涓嬩竴椤电偣鍑讳簨浠�
- handleNext(page) {
- this.currentPage = page;
- this.getUserList();
- },
+
handleClose(done) {
this.$confirm('纭鍏抽棴锛�')
.then(_ => {
@@ -329,68 +322,27 @@
handleNoClose(done) {
done();
},
- async JumpView(data) {
- this.code = data.code
- await this.getEventInfo(data.code);
+ JumpView(data) {
+
},
- // 鑾峰彇妗堜欢淇℃伅
- getEventInfo(code) {
- this.$axios({
- method: 'get',
- url: `sccg/base_case/baseCaseDetail/${code}`
- })
- .then(res => {
- console.log(res);
- this.info = res.data;
- this.dialogView = true;
- })
- },
- // 鑾峰彇妗堜欢淇℃伅
- getEventInfo3(code) {
- this.$axios({
- method: 'get',
- url: `sccg/base_case/baseCaseDetail/${code}`
- })
- .then(res => {
- console.log(res);
- this.info = res.data;
- this.dialogExamine = true;
- })
- },
- // 鑾峰彇妗堜欢淇℃伅
- getEventInfo2(code) {
- this.$axios({
- method: 'get',
- url: `sccg/base_case/baseCaseDetail/${code}`
- })
- .then(res => {
- console.log(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();
+ this.getList();
},
+
// 闂绫诲瀷
changeMyProblem(val) {
- this.getUserList();
+ this.getList();
},
+
// 瀹℃牳鐘舵��
changeInStatus(val) {
- this.getUserList();
+ this.getList();
},
+
filterTime(time) {
return helper(time);
}
@@ -407,7 +359,6 @@
display: flex;
line-height: 60px;
flex-direction: column;
- // justify-content: space-between;
padding: 0 20px;
color: #4b9bb7;
@@ -436,7 +387,6 @@
background-color: #09152f;
margin-top: 20px;
padding-bottom: 50px;
- border: 1pox solid #fff;
.btn span:hover {
cursor: pointer;
@@ -610,5 +560,9 @@
&::v-deep .el-dialog__body {
padding: 0;
}
+
+ &::v-deep .el-range-input {
+ background-color: #06122c;
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0