| | |
| | | articleId: '', |
| | | parentId: '', |
| | | level: '', |
| | | children: [{ |
| | | optionContent: '', |
| | | optionDetail: '', |
| | | number: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | deleteFlag: '', |
| | | articleId: '', |
| | | parentId: '', |
| | | level: '', |
| | | }] |
| | | children: [] |
| | | }, |
| | | optionDiscuss: { |
| | | emptyText: '取消', |
| | |
| | | trigger: 'blur' |
| | | }], |
| | | }, |
| | | |
| | | { |
| | | label: '最多可选', |
| | | label: '最少选', |
| | | prop: 'optionNumberMin', |
| | | display: false, |
| | | row: true, |
| | | min: 1, |
| | | max: 10, |
| | | type: 'number', |
| | | step: 1, |
| | | value: 1, |
| | | rules: [{ |
| | | required: true, |
| | | message: '请输入最少可选择数量', |
| | | trigger: 'blur' |
| | | }], |
| | | span: 3, |
| | | }, |
| | | { |
| | | label: '最多选', |
| | | prop: 'optionNumber', |
| | | display: false, |
| | | min: 1, |
| | | row: true, |
| | | max: 10, |
| | | type: 'number', |
| | | step: 1, |
| | | value: 1, |
| | |
| | | message: '请输入最多可选择数量', |
| | | trigger: 'blur' |
| | | }], |
| | | span: 4, |
| | | span: 3, |
| | | }, |
| | | |
| | | { |
| | | width: 110, |
| | | labelWidth: 100, |
| | |
| | | type: 'dynamic', |
| | | span: 24, |
| | | children: { |
| | | rowAdd: (done) => { |
| | | // this.$message.success('新增回调' + this.disCussFrom.children.length); |
| | | this.addC(this.disCussFrom.children.length) |
| | | done({ |
| | | input: '默认值' |
| | | }); |
| | | }, |
| | | rowDel: (row, done) => { |
| | | // this.$message.success('删除回调' + this.disCussFrom.children.length); |
| | | this.reduceC(this.disCussFrom.children.length) |
| | | done(); |
| | | }, |
| | | column: [{ |
| | | label: '选项标题', |
| | | prop: 'optionContent', |
| | |
| | | handler(newData) { |
| | | // console.log('** ** ** ** ** ** **', newData) |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | const columnMin = this.findObject(this.optionDiscuss.column, "optionNumberMin") |
| | | if (newData == 1) { |
| | | column.display = true |
| | | columnMin.display = true |
| | | } else { |
| | | column.display = false |
| | | columnMin.display = false |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | addC(number) { |
| | | console.log("******************", number) |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | const columnMin = this.findObject(this.optionDiscuss.column, "optionNumberMin") |
| | | column.max = number + 1 |
| | | columnMin.max = number + 1 |
| | | if (this.disCussFrom.optionNumber > number + 1) { |
| | | this.disCussFrom.optionNumber = number + 1 |
| | | } |
| | | if (this.disCussFrom.optionNumberMin > number + 1) { |
| | | this.disCussFrom.optionNumberMin = number + 1 |
| | | } |
| | | }, |
| | | |
| | | editC(number) { |
| | | console.log("******************", number) |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | const columnMin = this.findObject(this.optionDiscuss.column, "optionNumberMin") |
| | | column.max = number |
| | | columnMin.max = number |
| | | }, |
| | | |
| | | |
| | | reduceC(number) { |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | const columnMin = this.findObject(this.optionDiscuss.column, "optionNumberMin") |
| | | columnMin.max = number - 1 |
| | | column.max = number - 1 |
| | | if (this.disCussFrom.optionNumber > number - 1) { |
| | | this.disCussFrom.optionNumber = number - 1 |
| | | } |
| | | if (this.disCussFrom.optionNumberMin > number - 1) { |
| | | this.disCussFrom.optionNumberMin = number - 1 |
| | | } |
| | | }, |
| | | |
| | | handleExport() { |
| | | this.$confirm("是否导出投票人员数据?", "提示", { |
| | |
| | | }, |
| | | |
| | | add() { |
| | | this.disCussFrom = {} |
| | | this.editFlag = true |
| | | }, |
| | | |
| | |
| | | this.disCussFrom = row |
| | | this.disCussFromListClone = [].concat(row.children) |
| | | this.editFlag = true |
| | | this.editC(this.disCussFrom.children.length) |
| | | }, |
| | | |
| | | deletes(row) { |
| | |
| | | <template> |
| | | <el-dialog class="dept-user-table-dialog" width="70%" title="选择接收人" modal-append-to-body="false" append-to-body="true" |
| | | <el-dialog class="dept-user-table-dialog" width="70%" title="选择人员" modal-append-to-body="false" append-to-body="true" |
| | | :close-on-click-model="true" :visible.sync="showDialog" @close="showDialog = false"> |
| | | <!-- <div class="left"> |
| | | <el-scrollbar> |