传的key是orngiName ,值是列表中的phone
return {
idd: '',
isShowList: true,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 推广人员表格数据
manList: [],
// 弹出层标题
title: '',
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
customerId: null,
customerName: null,
name: null,
extensionCode: null,
identityCard: null,
phone: null,
tenantNo: null,
createName: null,
updateName: null
},
// 表单参数
form: {},
// 表单校验
rules: {},
qrCodeOpenFlag: false,
qrCodePath: '',
orngiName: '' //定义参数
}
**修改按钮**
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
//赋值操作
this.orngiName = row.phone;
const id = row.id || this.ids
getMan(id).then(response => {
this.form = response.data
this.open = true //弹出框打开
this.title = '修改推广人员'
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.id != null) {
//赋值操作,向后端传值
this.form.orngiName = this.orngiName;
updateMan(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addMan(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},