From 8ad7fe19f6cef00a5578c07b0570b8a0af9a8dcb Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期二, 21 二月 2023 15:23:14 +0800
Subject: [PATCH] 去掉勾选框

---
 src/views/operate/viewEvent/index.vue |  192 ++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 147 insertions(+), 45 deletions(-)

diff --git a/src/views/operate/viewEvent/index.vue b/src/views/operate/viewEvent/index.vue
index 27d6f79..e7e39ce 100644
--- a/src/views/operate/viewEvent/index.vue
+++ b/src/views/operate/viewEvent/index.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="userList">
     <header>
-      <div class="headerTitle">杩愯惀绠$悊 >> 妗堝嵎鏌ヨ</div>
+<!--      <div class="headerTitle">杩愯惀绠$悊 >> 妗堝嵎鏌ヨ</div>-->
       <div class="headerContent">
         <div class="contentItem">
           <div style="width: 80px">鎸夌紪鍙�:</div>
@@ -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">
@@ -40,7 +37,7 @@
           </div>
         </div>
         <div class="btn">
-          <el-button type="primary" @click="getList">鎼滅储</el-button>
+          <el-button type="primary" @click="getList">鏌ヨ</el-button>
         </div>
       </div>
       <div class="headerContent">
@@ -66,21 +63,24 @@
       <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',
           }"
           :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>{{ scope.row.code }}</el-link>
+              <el-link @click="handleView(scope.row)">{{ scope.row.code }}</el-link>
             </template>
           </el-table-column>
           <el-table-column prop="category" label="闂绫诲埆" min-width="8">
@@ -91,7 +91,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>
@@ -160,6 +160,34 @@
         </el-dialog>
         <!-- tools -->
         <div class="tools">
+          <div class="funs">
+            <div class="funsItem">
+              <el-checkbox v-model="all" @change="selectAll()"
+              >鍏ㄩ��</el-checkbox
+              >
+            </div>
+            <div class="funsItem">
+              <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
@@ -186,6 +214,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: {
@@ -198,6 +227,28 @@
   },
   data() {
     return {
+      all: false,
+      unsame: false,
+      myIdx: 0,
+      options: [
+        {
+          value: 0,
+          label: "鎵归噺鎿嶄綔",
+          disabled: true,
+        },
+        {
+          value: 1,
+          label: "鎵归噺鍚敤",
+        },
+        {
+          value: 2,
+          label: "鎵归噺绂佺敤",
+        },
+        {
+          value: 3,
+          label: "鎵归噺鍒犻櫎",
+        },
+      ],
       datepick: null,
       tableData: [],
       dialogExamine: false,
@@ -207,24 +258,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 +278,55 @@
   },
   created() {
     this.getList();
+    this.getCommunityOptions();
   },
   methods: {
+    // 鎵归噺鍒犻櫎
+    mulDelete(idArr) {},
+    // 鎵ц涓嬫媺妗嗘搷浣�
+    selectChange(val) {
+      let ids = [];
+      this.tempList.forEach((item) => {
+        ids.push(item.number);
+      });
+      if (ids.length !== 0) {
+        if (val === 3) {
+          this.mulDelete(ids);
+        }
+      } else {
+        this.$message({
+          type: "warning",
+          message: "鎮ㄨ繕娌¢�変腑浠讳綍鏁版嵁",
+        });
+      }
+    },
+    // 鐩戝惉琛ㄦ牸閫変腑鐘舵��
+    tableChange(list) {
+      this.tempList = list;
+      this.all = list.length === this.tableData.length;
+    },
+    // 鍏ㄩ��
+    selectAll() {
+      this.$refs.multipleTable.toggleAllSelection();
+    },
+    // 鍙嶉��
+    disSame(list) {
+      list.forEach((row) => {
+        this.$refs.multipleTable.toggleRowSelection(row);
+      });
+    },
     // 鑾峰彇鍒楄〃
     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 +336,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) {
@@ -289,7 +384,13 @@
     closeDialog({ flag }) {
       this.dialogExamine = flag;
       this.dialogClosure = flag;
+      this.dialogView = false;
       this.getList();
+    },
+
+    async handleView(rowData) {
+      this.info = await casequery.getBaseCaseDetail(rowData.code);
+      this.dialogView = true;
     },
 
     filterTime(time) {
@@ -305,14 +406,14 @@
 <style lang="scss" scoped>
 .userList {
   text-align: left;
-  margin: 10px 20px;
-  color: #4b9bb7;
-
+  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 {
@@ -330,7 +431,7 @@
   }
 
   main {
-    background-color: #09152f;
+    //background-color: #fff;
     margin-top: 20px;
     padding-bottom: 50px;
 
@@ -355,6 +456,7 @@
           line-height: 28px;
           display: flex;
           align-items: center;
+          border: 1px solid #ccc;
           border-radius: 4px;
           font-size: 12px;
           margin-left: 10px;
@@ -370,7 +472,7 @@
 
           &::v-deep .el-input__inner {
             border: none;
-            background-color: #09152f;
+            // background-color: #09152f;
           }
 
           &:hover {
@@ -393,7 +495,7 @@
           &::v-deep li,
           &::v-deep .btn-prev,
           &::v-deep .btn-next {
-            background-color: #071f39;
+            // background-color: #071f39;
             color: #4b9bb7;
           }
 
@@ -406,8 +508,8 @@
     }
 
     .el-table {
-      color: #4b9bb7;
-      font-size: 10px;
+      // color: #4b9bb7;
+      // font-size: 10px;
 
       &::v-deep .cell {
         text-overflow: ellipsis;
@@ -416,7 +518,7 @@
       }
 
       &::v-deep .el-table__empty-block {
-        background-color: #09152f;
+        // background-color: #09152f;
       }
 
       &::v-deep .el-table__empty-block {
@@ -429,7 +531,7 @@
         .line {
           padding: 0 5px;
         }
-
+        color: var(--operation-color);
         span:hover {
           cursor: pointer;
         }
@@ -437,11 +539,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 {
@@ -480,7 +582,7 @@
 
   &::v-deep .el-dialog__header,
   &::v-deep .el-dialog__body {
-    background-color: #06122c;
+    // background-color: #06122c;
   }
 
   &::v-deep .el-dialog__header {
@@ -506,7 +608,7 @@
   }
 
   &::v-deep .el-range-input {
-    background-color: #06122c;
+    // background-color: #06122c;
   }
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0