From 829f5116884f98643ffc5b2a548a600d40c0cedb Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 14 四月 2025 23:09:32 +0800
Subject: [PATCH] 处理图片显示问题

---
 src/views/operate/management/myIndex/index.vue |  326 ++++++++++++++++++++++++------------------------------
 1 files changed, 144 insertions(+), 182 deletions(-)

diff --git a/src/views/operate/management/myIndex/index.vue b/src/views/operate/management/myIndex/index.vue
index 157c418..762a39a 100644
--- a/src/views/operate/management/myIndex/index.vue
+++ b/src/views/operate/management/myIndex/index.vue
@@ -1,6 +1,16 @@
 <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">
@@ -20,21 +30,12 @@
     <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 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)">{{
@@ -49,29 +50,17 @@
               }}</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 :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 :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 :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'"
-          >
+          <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>{{
@@ -88,38 +77,23 @@
               <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 :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"
-          >
+          <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 :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 @click="handleExamine(scope.row)" v-if="instatus === 7"
-                  >瀹℃牳</span
-                >
-                <span @click="handleClosure(scope.row)" v-if="instatus === 8"
-                  >缁撴</span
-                >
+                <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>
@@ -127,82 +101,48 @@
           </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 :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 :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>
+        <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-select v-model="myIdx" placeholder="鎵归噺鎿嶄綔" @change="selectChange" disabled>
+        <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> -->
+                            </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>
@@ -226,6 +166,9 @@
   },
   data() {
     return {
+      seachData: {
+        code: "",
+      },
       tableData: [],
       dialogExamine: false,
       dialogClosure: false,
@@ -246,16 +189,8 @@
         },
         {
           value: 1,
-          label: "鎵归噺鍚敤",
-        },
-        {
-          value: 2,
-          label: "鎵归噺绂佺敤",
-        },
-        {
-          value: 3,
-          label: "鎵归噺鍒犻櫎",
-        },
+          label: "鎵归噺瀹℃牳",
+        }
       ],
       tempList: [],
       typeList: [
@@ -280,28 +215,42 @@
     this.getUserList();
   },
   methods: {
-    // 鎵归噺鍒犻櫎
-    mulDelete(idArr) {
+    // 鎵归噺瀹℃牳
+    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: "delete",
-        url: "sccg/violations/batch_delete?ids=" + idArr,
-      }).then((res) => {
-        this.getUserList();
-        this.$message({
-          message: res.message,
-          type: res.code === 200 ? "success" : "warning",
-        });
-      });
-    },
-    // 鎵ц涓嬫媺妗嗘搷浣�
-    selectChange(list) {
-      if (this.tempList.length !== 0) {
-        if (list === 3) {
-          this.preMyIdx = list;
-          this.mulDelete(this.tempList);
+        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.myIdx = this.preMyIdx;
         this.$message({
           type: "warning",
           message: "鎮ㄨ繕娌¢�変腑浠讳綍鏁版嵁",
@@ -312,7 +261,7 @@
     tableChange(list) {
       this.tempList = [];
       list.forEach((item) => {
-        this.tempList.push(item.code);
+        this.tempList.push(item.id);
       });
       this.all = list.length === this.tableData.length;
     },
@@ -342,14 +291,21 @@
             this.getUserList();
           });
         })
-        .catch((_) => {});
+        .catch((_) => { });
     },
     // 鑾峰彇鐢ㄦ埛鍒楄〃
     getUserList() {
-      const { currentPage, pageSize, instatus, myproblem } = this;
+      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}&current=${currentPage}&size=${pageSize}&type=${myproblem}`,
+        url: `sccg/base_case/query?state=${instatus}&current=${currentPage}&size=${pageSize}&type=${myproblem}&code=${seachData.code}`,
       }).then((res) => {
         this.totalNum = res.data.total;
         this.tableData = res.data.records;
@@ -384,7 +340,7 @@
           this.dialogExamine = false;
           done();
         })
-        .catch((_) => {});
+        .catch((_) => { });
     },
     handleNoClose(done) {
       done();
@@ -439,10 +395,14 @@
     },
     // 闂绫诲瀷
     changeMyProblem(val) {
+      this.seachData.code = '';
+      this.currentPage = 0;
       this.getUserList();
     },
     // 瀹℃牳鐘舵��
     changeInStatus(val) {
+      this.seachData.code = '';
+      this.currentPage = 0;
       this.getUserList();
     },
     filterTime(time) {
@@ -452,11 +412,16 @@
 };
 </script>
 <style lang="scss" scoped>
+.search {
+  line-height: 20px;
+}
+
 .userList {
   text-align: left;
-  padding: 10px 20px;
+  padding: 5px 10px;
   // color: #4b9bb7;
   border: 1px solid #ccc;
+
   header {
     // background-color: #09152f;
     //padding: 10px 20px;
@@ -465,7 +430,7 @@
     .status {
       display: flex;
       align-items: center;
-      line-height: 40px;
+      line-height: 30px;
     }
 
     .problem-title,
@@ -476,30 +441,40 @@
 
   &::v-deep .el-input__inner {
     // background-color: #09152f;
-    border: 1px solid #17324c;
+    // border: 1px solid #17324c;
+    line-height: 30px;
+  }
+
+  &::v-deep .el-form-item {
+    margin-bottom: 5px;
   }
 
   main {
     // background-color: #09152f;
-    margin-top: 20px;
+    margin-top: 10px;
     padding-bottom: 50px;
+
     .btn span:hover {
       cursor: pointer;
     }
+
     .tools {
       display: flex;
       justify-content: space-between;
       align-items: center;
-      //padding: 0 20px;
 
+      //padding: 0 20px;
       .funs {
         display: flex;
+
         .funs-first {
           margin-left: 0 !important;
         }
+
         .funs-sp {
           border: 1px solid #dcdfe6;
         }
+
         .funsItem {
           line-height: 28px;
           display: flex;
@@ -538,19 +513,7 @@
         line-height: 50px;
         justify-content: center;
 
-        .el-pagination {
-          &::v-deep li,
-          &::v-deep .btn-prev,
-          &::v-deep .btn-next {
-            background-color: #071f39;
-            color: #4b9bb7;
-          }
-
-          &::v-deep .active {
-            background-color: #409eff;
-            color: #fff;
-          }
-        }
+        .el-pagination {}
       }
     }
 
@@ -562,9 +525,6 @@
         text-overflow: ellipsis;
         white-space: nowrap;
         overflow: hidden;
-        .el-checkbox {
-          display: none;
-        }
       }
 
       // &::v-deep .el-table__empty-block {
@@ -581,7 +541,9 @@
         .line {
           padding: 0 5px;
         }
+
         color: var(--operation-color);
+
         span:hover {
           cursor: pointer;
         }
@@ -631,11 +593,11 @@
   }
 
   &::v-deep .el-dialog__header,
-    // &::v-deep .el-dialog__body {
-    //     background-color: #06122c;
-    // }
+  // &::v-deep .el-dialog__body {
+  //     background-color: #06122c;
+  // }
 
-    &::v-deep .el-dialog__header {
+  &::v-deep .el-dialog__header {
     display: flex;
     align-items: center;
     background-color: #fff;

--
Gitblit v1.8.0