当后台想要获取用户输入的数值时
代码如下
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<el-form :model="auditOpinion">
<el-form-item>
<el-radio-group v-model="auditOpinion.chkState">
<el-radio :label="1">通过</el-radio>
<el-radio :label="2">未通过</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-input type="textarea" placeholder="请输入审核意见" v-model="auditOpinion.chkRemarks" prop="desc"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="auditok">确 定</el-button>
</span>
</el-dialog>
auditOpinion: {
id: '',
chkState: null,
chkRemarks: ''
},
// 点击审核
auditmethod (row) {
this.dialogVisible = true
this.auditOpinion.id = row.id
},
// 点击确定审核通过
async auditok () {
const res = await choiceCheck(this.auditOpinion)
console.log('审核', res)
this.acquestions()
},