| | |
| | | </template> |
| | | <template #menu="{ row, size }"> |
| | | <el-button v-if="row.level === 1" :size="size" text type="primary" @click="edit(row)">编辑</el-button> |
| | | <el-button v-if="row.level === 1" :size="size" text type="danger" |
| | | @click="deletes(row)">删除</el-button> |
| | | <el-button v-if="row.level === 1" :size="size" text type="danger" @click="deletes(row)">删除</el-button> |
| | | <el-button v-if="row.level === 2" :size="size" text type="primary" @click="openUser(row, 1)"> |
| | | 选择此项人数:{{ row.number }} 详情</el-button> |
| | | </template> |
| | |
| | | message: '请选项范围', |
| | | trigger: 'blur' |
| | | }], |
| | | }, { |
| | | label: '最多选择数', |
| | | prop: 'optionNumber', |
| | | min: 1, |
| | | type: 'number', |
| | | step: 1, |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: '选项内容', |
| | |
| | | }, |
| | | |
| | | // 表单数据 |
| | | form: {}, |
| | | form: { |
| | | optionRange: 0, |
| | | }, |
| | | data: [], |
| | | optionList: { |
| | | headerAlign: 'center', |
| | |
| | | } |
| | | }, |
| | | |
| | | watch: {}, |
| | | watch: { |
| | | 'froms.optionRange': { |
| | | handler(newData) { |
| | | console.log('** ** ** ** ** ** **', newData) |
| | | const column = this.findObject(this.optionDiscuss.column, "optionNumber") |
| | | if (newData == 1) { |
| | | column.display = true |
| | | } else { |
| | | column.display = false |
| | | } |
| | | }, |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | }).then(() => { |
| | | return remove(row.id) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad() |
| | | |
| | | }).then(() => { |
| | | let param = {} |
| | | this.onLoad(this.userPage, param) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |