From a567c5d6ba1d67f008d81ae5a00aa224fb60b1d8 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Thu, 18 Jan 2024 11:53:47 +0800
Subject: [PATCH] 邮件配置

---
 src/views/article/components/deitDiscussion.vue |   91 +++++++++++++++++++++++++++++++++++++--------
 1 files changed, 74 insertions(+), 17 deletions(-)

diff --git a/src/views/article/components/deitDiscussion.vue b/src/views/article/components/deitDiscussion.vue
index 8d81e53..e7ea244 100644
--- a/src/views/article/components/deitDiscussion.vue
+++ b/src/views/article/components/deitDiscussion.vue
@@ -40,8 +40,9 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="" append-to-body :visible.sync="popupTableUserShow" width="50%" :before-close="userHandleClose">
-      <avue-crud :data="userData" :page="userPage" :option="userOption"></avue-crud>
+    <el-dialog title="" append-to-body :visible.sync="popupTableUserShow" width="80%" :before-close="userHandleClose">
+      <avue-crud :data="userData" :page="userPage" :option="userOption" @search-change="searchChange"
+        @search-reset="searchReset"></avue-crud>
     </el-dialog>
   </div>
 </template>
@@ -58,6 +59,8 @@
   import {
     getPage
   } from "@/api/discuss/userTopics"
+
+  import website from '@/config/website'
 
 
   import {
@@ -186,23 +189,53 @@
 
         userData: [],
         userOption: {
-          addBtn: false,
+          labelWidth: 96,
+          searchLabelWidth: 96,
+          searchShow: true,
+          searchMenuSpan: 3,
+          // menuWidth: 500,
           menu: false,
+
+          height: "auto",
+          calcHeight: 54,
+          dialogWidth: 950,
+          tip: false,
+          border: false,
+          //stripe:true,
+          index: true,
+          editBtn: false,
+          addBtn: false,
+          viewBtn: false,
+          selection: true,
+          delBtn: false,
+          excelBtn: true,
+          dialogClickModal: false,
           column: [{
             label: '姓名',
-            prop: 'name'
+            prop: 'name',
+            searchSpan: 4,
+            search: true,
           }, {
             label: '头像',
+            type: 'upload',
+            listType: "picture-img",
             prop: 'avatar'
           }, {
             label: '手机',
-            prop: 'phone'
+            prop: 'phone',
+            searchSpan: 4,
+            search: true,
           }, {
             label: '小区',
             prop: 'aoiName'
           }, {
             label: '地址',
             prop: 'addressName'
+          }, {
+            label: '签名',
+            type: 'upload',
+            listType: "picture-img",
+            prop: 'signaturePath'
           }, {
             label: '时间',
             prop: 'createTime'
@@ -215,19 +248,45 @@
           currentPage: 1,
           total: 0
         },
+        query: {},
       }
     },
 
     watch: {},
 
     methods: {
+
+      userHandleClose() {
+
+        this.popupTableUserShow = false
+      },
+
+      searchReset() {
+        this.query = {}
+        this.getUserPage(this.userPage)
+      },
+
+      searchChange(params, done) {
+        this.query = params
+        this.userPage.currentPage = 1
+        this.getUserPage(this.userPage, params)
+        done()
+      },
       initData(newData) {
         this.editFlag = false
         this.popupTableShow = true
         this.articleId = newData.id
-
-        this.onLoad()
+        this.query.level = 1
+        this.query.articleId = this.articleId
+        this.onLoad(this.userPage, this.query)
       },
+      // initData(newData) {
+      //   this.editFlag = false
+      //   this.popupTableShow = true
+      //   this.articleId = newData.id
+
+      //   this.onLoad()
+      // },
 
       handleClose() {
         this.popupTableShow = false
@@ -301,7 +360,7 @@
             return remove(row.id)
           })
           .then(() => {
-            this.onLoad()
+            this.getUserPage(this.userPage)
 
             this.$message({
               type: "success",
@@ -340,7 +399,7 @@
 
       openUser(row, type = 0) {
         this.popupTableUserShow = true
-
+        this.query = {}
         if (type == 0) {
           this.userParams = {
             articleId: row.id
@@ -362,19 +421,17 @@
             if (item.avatar.length > 0) {
               item.avatar = website.minioUrl + item.avatar
             }
+            if (item.signaturePath && item.signaturePath.length > 0) {
+              item.signaturePath = website.minioUrl + item.signaturePath
+              // console.log("=====>", item.signaturePath)
+            }
           })
         })
       },
 
-      onLoad() {
+      onLoad(page, params = {}) {
         this.loading = true
-
-        let params = {
-          level: 1,
-          articleId: this.articleId
-        }
-
-        getLists(1, 100, Object.assign(params, this.query)).then(res => {
+        getLists(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
           const data = res.data.data
           this.data = data
           this.loading = false

--
Gitblit v1.9.3