From 085fa2fb257e9f11f8f6d34bf12e2dc281c36b4d Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期四, 09 二月 2023 11:28:21 +0800
Subject: [PATCH] 2023/2/9 肖辉 修改部门管理
---
src/views/operate/viewEvent/index.vue | 91 +++++++++++++++++++++++++--------------------
1 files changed, 50 insertions(+), 41 deletions(-)
diff --git a/src/views/operate/viewEvent/index.vue b/src/views/operate/viewEvent/index.vue
index 24ec25a..7f3cc76 100644
--- a/src/views/operate/viewEvent/index.vue
+++ b/src/views/operate/viewEvent/index.vue
@@ -15,19 +15,16 @@
<div class="contentItem">
<div style="width: 80px">鎸夌被鍨�:</div>
<div class="search">
- <el-input
- placeholder=" 璇疯緭鍏ョ被鍨�"
- v-model="searchData.categories"
- ></el-input>
+ <el-select clearable v-model="searchData.categories" placeholder=" 璇烽�夋嫨绫诲瀷">
+ <el-option v-for="option in categoryOptions" :key="option.id" :label="option.label" :value="option.value"></el-option>
+ </el-select>
</div>
</div>
<div class="contentItem">
<div style="width: 80px">鎸夌ぞ鍖�:</div>
<div class="search">
- <el-input
- placeholder=" 璇疯緭鍏ョぞ鍖�"
- v-model="searchData.communityId"
- ></el-input>
+ <el-cascader clearable v-model="searchData.community" :props="communityProps" :options="communityOptions" placeholder="璇烽�夋嫨绀惧尯">
+ </el-cascader>
</div>
</div>
<div class="contentItem">
@@ -66,11 +63,12 @@
<div class="mainContent">
<!-- 鏁版嵁灞曠ず -->
<el-table
+ border
+ stripe
ref="multipleTable"
:header-cell-style="{
- background: '#06122c',
- 'font-size': '12px',
- color: '#4b9bb7',
+ 'background':'#F5F5F5',
+ background: '#fff',
'font-weight': '650',
'line-height': '45px',
}"
@@ -91,7 +89,7 @@
<el-table-column prop="eventSource" label="闂鏉ユ簮" min-width="8">
<template v-if="scope.row.eventSource" slot-scope="scope">
<span>{{
- scope.row.eventSource === 2 ? "浜哄伐涓婃姤" : "瑙嗛涓婁紶"
+ scope.row.eventSource === 2 ? "浜哄伐涓婃姤" : "瑙嗛宸℃煡"
}}</span>
</template>
</el-table-column>
@@ -186,6 +184,7 @@
import helper from "@/utils/mydate";
import casequery from "@/api/operate/basecase";
import { CATEGOTY } from "@/utils/helper";
+import department from "@/api/system/department";
export default {
components: {
@@ -207,24 +206,18 @@
totalNum: null,
pageSize: 10,
currentPage: 1,
- typeList: [
- {
- name: "杩濊",
- value: 1,
- checked: true,
- },
- {
- name: "杩濆缓",
- value: 2,
- checked: false,
- },
- ],
+ categoryOptions: CATEGOTY,
+ communityOptions: [],
+ communityProps: {
+ label: 'regionName',
+ value: 'id'
+ },
myproblem: 1,
number: "",
searchData: {
categories: null,
number: null,
- communityId: null,
+ community: null,
endTime: null,
site: null,
startTime: null,
@@ -233,15 +226,21 @@
},
created() {
this.getList();
+ this.getCommunityOptions();
},
methods: {
// 鑾峰彇鍒楄〃
getList() {
+ const searchData = Object.assign({}, this.searchData);
+ if (this.searchData.community) {
+ searchData.communityId = searchData.community[1];
+ }
+ delete searchData.community;
casequery
.baseCaseQuery({
current: this.currentPage,
pageSize: this.pageSize,
- ...this.searchData,
+ ...searchData,
})
.then((res) => {
this.tableData = res.records;
@@ -251,6 +250,16 @@
this.tableData = [];
});
},
+
+ // 鑾峰彇绀惧尯鍜岃閬�
+ getCommunityOptions() {
+ department.getDepartmentList()
+ .then(res => {
+ this.communityOptions = res;
+ })
+ .catch(err => this.$message.error(err))
+ },
+
// 璁剧疆琛ㄦ牸鏂戦┈绾�
tableRowClassName({ row, rowIndex }) {
if ((rowIndex + 1) % 2 === 0) {
@@ -311,14 +320,14 @@
<style lang="scss" scoped>
.userList {
text-align: left;
- margin: 10px 20px;
+ padding: 10px 20px;
color: #4b9bb7;
-
+ border: 1px solid #ccc;
header {
display: flex;
line-height: 60px;
flex-direction: column;
- padding: 0 20px;
+ padding: 0;
color: #4b9bb7;
.headerContent {
@@ -336,7 +345,7 @@
}
main {
- background-color: #09152f;
+ background-color: #fff;
margin-top: 20px;
padding-bottom: 50px;
@@ -376,7 +385,7 @@
&::v-deep .el-input__inner {
border: none;
- background-color: #09152f;
+ // background-color: #09152f;
}
&:hover {
@@ -399,7 +408,7 @@
&::v-deep li,
&::v-deep .btn-prev,
&::v-deep .btn-next {
- background-color: #071f39;
+ // background-color: #071f39;
color: #4b9bb7;
}
@@ -412,8 +421,8 @@
}
.el-table {
- color: #4b9bb7;
- font-size: 10px;
+ // color: #4b9bb7;
+ // font-size: 10px;
&::v-deep .cell {
text-overflow: ellipsis;
@@ -422,7 +431,7 @@
}
&::v-deep .el-table__empty-block {
- background-color: #09152f;
+ // background-color: #09152f;
}
&::v-deep .el-table__empty-block {
@@ -435,7 +444,7 @@
.line {
padding: 0 5px;
}
-
+ color: var(--operation-color);
span:hover {
cursor: pointer;
}
@@ -443,11 +452,11 @@
}
.el-table::v-deep .warning-row {
- background: #06122c;
+ // background: #06122c;
}
.el-table::v-deep .success-row {
- background: #071f39;
+ // background: #071f39;
}
&::v-deep .switchStyle .el-switch__label {
@@ -486,7 +495,7 @@
&::v-deep .el-dialog__header,
&::v-deep .el-dialog__body {
- background-color: #06122c;
+ // background-color: #06122c;
}
&::v-deep .el-dialog__header {
@@ -512,7 +521,7 @@
}
&::v-deep .el-range-input {
- background-color: #06122c;
+ // background-color: #06122c;
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0