Vue点击按钮弹出页面
先在data里面定义变量visible:false,id:'',来个a标签<a @click="inpect(record)">核查</a>methods中的方法inspect(record){this.visible = true;this.id = record.id;},给个model<a-modal title="数据核查" v-model="visible"
·
先在data里面定义变量
visible:false,
id:'',
来个a标签
<a @click="inpect(record)">核查</a>
methods中的方法
inspect(record){
this.visible = true;
this.id = record.id;
},
给个model
<a-modal title="数据核查" v-model="visible" @ok="handleOk2()">
<a-row :gutter="20">
<a-col :span="18">
<a-form-item label="核查状态">
<j-dict-select-tag type="list" v-model="zhuang" style="width: 100%;" dictCode="verification_status" placeholder="请选择核查砖头"/>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="20">
<a-col :span="18">
<a-form-item label="上传证明材料">
<j-upload v-model="materials" :trigger-change="true"></j-upload>
</a-form-item>
</a-col>
</a-row>
</a-modal>
好了,接着就是handleOk2方法了,后台根据id更新这条数据
handleOk2(){
var aaa = this.zhuang;
var bbb = this.materials;
var id = this.theid;
this.axios.get('/basicdataverification/basicDataVerification/verification', { params: { 'id': id,'status': aaa,'materials':bbb } }).then((response)=>{
console.log("返回的结果",response)
})
this.visible = false;
},
更多推荐
已为社区贡献1条内容
所有评论(0)