From 122faf2b3a03f7ef381d70a38684fe0b70d42ebc Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期二, 12 十二月 2023 22:17:39 +0800
Subject: [PATCH] 图片上传显示bug

---
 src/views/operate/management/message/index.vue |  114 +++++++++++++++++++++++++++------------------------------
 1 files changed, 54 insertions(+), 60 deletions(-)

diff --git a/src/views/operate/management/message/index.vue b/src/views/operate/management/message/index.vue
index d53a03a..bf39969 100644
--- a/src/views/operate/management/message/index.vue
+++ b/src/views/operate/management/message/index.vue
@@ -5,17 +5,20 @@
       <div class="header-content">
         <div class="search">
           <span>ID:</span>
-          <el-input placeholder="ID" v-model="context"></el-input>
+          <el-input placeholder="璇疯緭鍏D" v-model="context"></el-input>
         </div>
         <div class="status">
           <span>鐭俊鐘舵��:</span>
-          <el-radio-group v-model="status">
+          <el-radio-group v-model="status" @input="getMessageAuditList">
             <el-radio :label="0">寰呭鏍�</el-radio>
             <el-radio :label="1">宸插鏍�</el-radio>
           </el-radio-group>
         </div>
         <div class="btns">
-          <el-button type="primary" icon="el-icon-search" @click="handleSearch"
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            @click="getMessageAuditList"
             >鏌ヨ</el-button
           >
           <el-button icon="el-icon-delete-solid" @click="handleReset"
@@ -41,8 +44,8 @@
               >瀹℃牳</el-link
             >
           </template>
-          <template #time="{timeobj}">
-            <span>{{ changeUpdateTime(timeobj.row.updateTime)}}</span>
+          <template #time="{ timeobj }">
+            <span>{{ changeUpdateTime(timeobj.row.updateTime) }}</span>
           </template>
         </MyTable>
         <div class="tools">
@@ -66,12 +69,12 @@
         <!-- 瀹℃牳椤甸潰 -->
         <el-dialog
           :visible.sync="dialogCheckSms"
-          width="80%"
+          width="60%"
           title="娑堟伅璇︽儏"
-          v-if="dialogCheckSms"
           :before-close="handleClose"
         >
           <MyCheckSms
+            v-if="dialogCheckSms"
             :messageData="messageData"
             @closeDialog="closeDialog"
           ></MyCheckSms>
@@ -156,39 +159,34 @@
     };
   },
   created() {
-    const { setTableData } = this;
-    this.setTableData();
+    this.getMessageAuditList();
   },
   methods: {
-    handleSearch() {
-      this.setTableData();
-    },
     // 閲嶇疆
-    handleReset() {},
-    // 璁剧疆琛ㄦ牸鏁版嵁
-    async setTableData() {
-      const arr = await this.getMessageAuditList();
-      this.tableData = arr.records;
-      this.totalNum = arr.total;
+    handleReset() {
+      this.context = "";
+      this.status = 0;
+      this.getMessageAuditList();
     },
     // 鑾峰彇娑堟伅鏁版嵁
-    async getMessageAuditList() {
-      let arr = [];
-      const { currentPage, pageSize, context, status } = this;
-      await this.$axios({
+    getMessageAuditList() {
+      this.$axios({
         method: "post",
         url: "sccg/message_audit/list",
         data: {
-          messageId: context,
-          auditId:this.auditId,
-          auditStatus: status,
-          current: currentPage,
-          pageSize: pageSize,
+          messageId: this.context,
+          auditId: this.auditId,
+          auditStatus: this.status,
+          current: this.currentPage,
+          pageSize: this.pageSize,
         },
-      }).then((res) => {
-        arr = res.data;
-      });
-      return arr;
+      })
+        .then((res) => {
+          const { records, total } = res.data;
+          this.tableData = records;
+          this.totalNum = total;
+        })
+        .catch((err) => this.$message.error(err));
     },
     // 寮圭獥鍏抽棴
     handleClose(done) {
@@ -199,12 +197,12 @@
     // 褰撳墠椤垫敼鍙樿Е鍙戜簨浠�
     changeCurrentPage(page) {
       this.currentPage = page;
-      this.setTableData();
+      this.getMessageAuditList();
     },
     // 鍘诲鏍�
     handleCheckSms(info) {
-      this.messageData = info;
-      if (this.messageData.info.row.auditStatus === 1) {
+      this.messageData = info.info.row;
+      if (info.info.row.auditStatus === 1) {
         this.$message({ message: "璇ユ秷鎭凡琚鏍革紒" });
         this.dialogCheckSms = false;
       } else {
@@ -213,15 +211,14 @@
     },
     // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛淇℃伅
     getLoginUserInfo() {
-            const name = sessionStorage.getItem('name');
-            this.$axios({
-                method: 'get',
-                url: 'sccg/admin/info?name=' + name,
-            })
-                .then(res => {
-                    this.auditId = res.data.userId
-                })
-     },
+      const name = sessionStorage.getItem("name");
+      this.$axios({
+        method: "get",
+        url: "sccg/admin/info?name=" + name,
+      }).then((res) => {
+        this.auditId = res.data.userId;
+      });
+    },
     // 鍏抽棴dialog
     closeDialog({ flag, index }) {
       this.dialogCheckSms = flag;
@@ -231,7 +228,6 @@
     },
     // 鏀瑰彉鏇存柊鏃堕棿
     changeUpdateTime(time) {
-        console.log(time)
       if (time) {
         return helper(time);
       }
@@ -243,19 +239,18 @@
 <style lang="scss" scoped>
 .message {
   text-align: left;
-  margin: 10px 20px;
+  padding: 10px 20px;
   color: #4b9bb7;
-
+  border: 1px solid #ccc;
   header {
-    background-color: #09152f;
-    border: 1pox solid #fff;
+    background-color: white;
     .header-title {
       line-height: 40px;
-      padding: 0 20px;
+      //padding: 0 20px;
       border-bottom: 1px solid #4b9bb7;
     }
     .header-content {
-      padding: 0 40px;
+      //padding: 0 40px;
       display: flex;
       line-height: 100px;
       justify-content: space-between;
@@ -274,8 +269,8 @@
           color: #1d3f57;
 
           &::v-deep .el-input__inner {
-            background-color: #09152f;
-            border: 1px solid #17324c;
+            // background-color: #09152f;
+            //border: 1px solid #17324c;
           }
         }
       }
@@ -283,10 +278,9 @@
   }
 
   main {
-    background-color: #09152f;
+    background-color: #ffffff;
     margin-top: 20px;
     padding-bottom: 50px;
-    border: 1pox solid #fff;
 
     .main-title {
       line-height: 60px;
@@ -322,7 +316,7 @@
 
           &::v-deep .el-input__inner {
             border: none;
-            background-color: #09152f;
+            // background-color: #09152f;
           }
 
           &:hover {
@@ -345,7 +339,7 @@
           &::v-deep li,
           &::v-deep .btn-prev,
           &::v-deep .btn-next {
-            background-color: #071f39;
+            // background-color: #071f39;
             color: #4b9bb7;
           }
 
@@ -358,8 +352,8 @@
     }
 
     .el-table {
-      color: #4b9bb7;
-      font-size: 10px;
+      // color: #4b9bb7;
+      // font-size: 10px;
 
       .operation {
         display: flex;
@@ -367,7 +361,7 @@
         .line {
           padding: 0 5px;
         }
-
+        color: var(--operation-color);
         span:hover {
           cursor: pointer;
         }
@@ -375,4 +369,4 @@
     }
   }
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0