From 6ad9528f48ad50d6a73a32f967fdf88b0e6b025a Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Thu, 18 Jan 2024 17:48:58 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_web
---
src/views/article/components/deitDiscussion.vue | 116 ++++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 92 insertions(+), 24 deletions(-)
diff --git a/src/views/article/components/deitDiscussion.vue b/src/views/article/components/deitDiscussion.vue
index 8d81e53..3f399a0 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 {
@@ -112,11 +115,17 @@
prop: 'discussContent',
type: 'input',
row: true,
+ rules: [{
+ required: true,
+ message: '请输入议题',
+ trigger: 'blur'
+ }],
},
{
label: '选项范围',
prop: 'optionRange',
type: 'radio',
+ value: 0,
button: true,
row: true,
dicData: [{
@@ -125,14 +134,19 @@
}, {
label: '单选',
value: 0
- }]
+ }],
+ rules: [{
+ required: true,
+ message: '请选项范围',
+ trigger: 'blur'
+ }],
},
- {
- label: '排序',
- prop: 'sort',
- controlsPosition: '',
- type: 'number'
- },
+ // {
+ // label: '排序',
+ // prop: 'sort',
+ // controlsPosition: '',
+ // type: 'number'
+ // },
{
label: '选项内容',
prop: 'children',
@@ -186,23 +200,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 +259,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 +371,7 @@
return remove(row.id)
})
.then(() => {
- this.onLoad()
+ this.getUserPage(this.userPage)
this.$message({
type: "success",
@@ -340,7 +410,7 @@
openUser(row, type = 0) {
this.popupTableUserShow = true
-
+ this.query = {}
if (type == 0) {
this.userParams = {
articleId: row.id
@@ -362,19 +432,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