From 6c2aa8e5a465c712d7855b77bc0b83bb4aa53231 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Fri, 12 Jan 2024 17:42:42 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web

---
 src/views/article/components/deitDiscussion.vue |  102 +++++++++++++++++++++++++++++---------------------
 1 files changed, 59 insertions(+), 43 deletions(-)

diff --git a/src/views/article/components/deitDiscussion.vue b/src/views/article/components/deitDiscussion.vue
index 5ac6b3a..44369ec 100644
--- a/src/views/article/components/deitDiscussion.vue
+++ b/src/views/article/components/deitDiscussion.vue
@@ -12,8 +12,9 @@
   <div>
 
 
-    <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" @search-change="searchChange" @row-del="rowDel" @search-reset="searchReset"
+        :page="userPage" :option="userOption"></avue-crud>
     </el-dialog>
   </div>
 </template>
@@ -28,7 +29,8 @@
   } from "@/api/discuss/publicDiscuss"
 
   import {
-    getPage
+    getPage,
+    remove
   } from "@/api/discuss/userTopics"
 
 
@@ -41,7 +43,6 @@
     getDetail,
     add,
     update,
-    remove
   } from "@/api/discuss/topics"
 
   export default {
@@ -56,28 +57,49 @@
         articleId: '',
         userData: [],
         userOption: {
+          labelWidth: 96,
+          searchLabelWidth: 96,
+          searchShow: true,
+          searchMenuSpan: 3,
+          // menuWidth: 500,
+
+          height: "auto",
+          calcHeight: 54,
+          dialogWidth: 950,
+          tip: false,
+          border: false,
+          //stripe:true,
+          index: true,
+          editBtn: false,
           addBtn: false,
-          menu: false,
+          viewBtn: false,
+          selection: true,
+          excelBtn: true,
+          dialogClickModal: false,
           column: [{
             label: '姓名',
-            prop: 'name'
+            prop: 'name',
+            searchSpan: 4,
+            search: true,
           }, {
             label: '头像',
             prop: 'avatar'
           }, {
-            label: '签名',
-            type: 'upload',
-            listType: "picture-img",
-            prop: 'signaturePath'
-          }, {
             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'
@@ -96,12 +118,31 @@
     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)
       },
 
       handleClose() {
@@ -176,8 +217,7 @@
             return remove(row.id)
           })
           .then(() => {
-            this.onLoad()
-
+            this.getUserPage(this.userPage)
             this.$message({
               type: "success",
               message: "操作成功!"
@@ -194,28 +234,10 @@
         this.editFlag = true
       },
 
-      deletes(row) {
-        this.$confirm("确定将选择数据删除?", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          })
-          .then(() => {
-            return remove(row.id)
-          })
-          .then(() => {
-            this.onLoad()
-
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            })
-          })
-      },
 
       openUser(row, type = 0) {
         this.popupTableUserShow = true
-
+        this.query = {}
         if (type == 0) {
           this.userParams = {
             articleId: row.id
@@ -245,15 +267,9 @@
         })
       },
 
-      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