| | |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="" append-to-body :visible.sync="popupTableUserShow" width="80%" :before-close="userHandleClose"> |
| | | <avue-crud :data="userData" :page="userPage" :option="userOption"></avue-crud> |
| | | <avue-crud :data="userData" :page="userPage" :option="userOption" @search-change="searchChange" |
| | | @search-reset="searchReset"></avue-crud> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | prop: 'discussContent', |
| | | type: 'input', |
| | | row: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: '请输入议题', |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | { |
| | | label: '选项范围', |
| | | prop: 'optionRange', |
| | | type: 'radio', |
| | | value: 0, |
| | | button: true, |
| | | row: true, |
| | | dicData: [{ |
| | |
| | | }, { |
| | | label: '单选', |
| | | value: 0 |
| | | }] |
| | | }], |
| | | rules: [{ |
| | | required: true, |
| | | message: '请选项范围', |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | { |
| | | label: '排序', |
| | | prop: 'sort', |
| | | controlsPosition: '', |
| | | type: 'number' |
| | | }, |
| | | // { |
| | | // label: '排序', |
| | | // prop: 'sort', |
| | | // controlsPosition: '', |
| | | // type: 'number' |
| | | // }, |
| | | { |
| | | label: '选项内容', |
| | | prop: 'children', |
| | |
| | | searchShow: true, |
| | | searchMenuSpan: 3, |
| | | // menuWidth: 500, |
| | | menu: false, |
| | | |
| | | height: "auto", |
| | | calcHeight: 54, |
| | | dialogWidth: 950, |
| | | tip: false, |
| | | border: false, |
| | | border: true, |
| | | //stripe:true, |
| | | index: true, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | selection: true, |
| | | delBtn: false, |
| | | excelBtn: true, |
| | | dialogClickModal: false, |
| | | column: [{ |
| | |
| | | search: true, |
| | | }, { |
| | | label: '头像', |
| | | type: 'upload', |
| | | listType: "picture-img", |
| | | prop: 'avatar' |
| | | }, { |
| | | label: '手机', |
| | |
| | | total: 0 |
| | | }, |
| | | query: {}, |
| | | newData: {}, |
| | | articleRange: {}, |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.query = {} |
| | | this.getUserPage(this.userPage) |
| | | if (this.articleRange) { |
| | | this.query.districtId = this.newData.articleRange |
| | | } |
| | | this.query.articleId = this.articleId |
| | | this.userPage.currentPage = 1 |
| | | this.getUserPage(this.userPage, this.query) |
| | | }, |
| | | |
| | | searchChange(params, done) { |
| | | if (this.articleRange) { |
| | | this.query.districtId = this.newData.articleRange |
| | | } |
| | | this.query = params |
| | | this.query.articleId = this.articleId |
| | | this.userPage.currentPage = 1 |
| | | this.getUserPage(this.userPage, params) |
| | | this.getUserPage(this.userPage, this.query) |
| | | done() |
| | | }, |
| | | initData(newData) { |
| | |
| | | this.articleId = newData.id |
| | | this.query.level = 1 |
| | | this.query.articleId = this.articleId |
| | | this.newData = newData |
| | | this.query.districtId = newData.articleRange |
| | | this.onLoad(this.userPage, this.query) |
| | | }, |
| | | // initData(newData) { |
| | |
| | | openUser(row, type = 0) { |
| | | this.popupTableUserShow = true |
| | | this.query = {} |
| | | this.articleId = row.id |
| | | let districtId |
| | | if (type == 0) { |
| | | this.newData = row |
| | | districtId = this.newData.articleRange |
| | | this.userParams = { |
| | | articleId: row.id |
| | | articleId: row.id, |
| | | districtId: districtId |
| | | } |
| | | } else { |
| | | districtId = this.newData.articleRange |
| | | this.userParams = { |
| | | topicsId: row.id |
| | | topicsId: row.id, |
| | | districtId: districtId |
| | | } |
| | | } |
| | | this.getUserPage(this.userPage, this.userParams) |