| | |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="popupTableUserShow" width="50%" :before-close="userHandleClose"> |
| | | <el-dialog title="" append-to-body :visible.sync="popupTableUserShow" width="80%" :before-close="userHandleClose"> |
| | | <avue-crud :data="userData" :page="userPage" :option="userOption"></avue-crud> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | import { |
| | | getPage |
| | | } from "@/api/discuss/userTopics" |
| | | |
| | | import website from '@/config/website' |
| | | |
| | | |
| | | import { |
| | |
| | | |
| | | 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: '手机', |
| | | 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' |
| | |
| | | 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 |
| | |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad() |
| | | this.getUserPage(this.userPage) |
| | | |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | |
| | | openUser(row, type = 0) { |
| | | this.popupTableUserShow = true |
| | | |
| | | this.query = {} |
| | | if (type == 0) { |
| | | this.userParams = { |
| | | articleId: row.id |
| | |
| | | const data = res.data.data |
| | | this.userPage.total = data.total |
| | | this.userData = data.records |
| | | this.userData.forEach(item => { |
| | | 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 |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped></style> |