| | |
| | | props: { |
| | | getinit: { |
| | | type: Function, |
| | | default: function () {}, |
| | | default: function () {} |
| | | }, |
| | | agentlist: { |
| | | type: Array, |
| | | }, |
| | | type: Array |
| | | } |
| | | }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 7 }, |
| | | sm: { span: 7 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 13 }, |
| | | sm: { span: 13 } |
| | | }, |
| | | editUserform: this.$form.createForm(this), |
| | | editUserdialog: false, |
| | | editUserDialogloading: false, |
| | | fields: ['id', 'agentPhone', 'agentRealName', 'agentPwd', 'onLineServices', 'siteLever', 'isLock'], |
| | | currentDetails: {}, |
| | | currentDetails: {} |
| | | } |
| | | }, |
| | | methods: { |
| | | getEditorder(val) { |
| | | getEditorder (val) { |
| | | this.currentDetails = val |
| | | this.editUserdialog = true |
| | | this.fields.forEach((v) => this.editUserform.getFieldDecorator(v)) |
| | |
| | | this.editUserform.setFieldsValue(pick({ agentPwd: '' }, this.fields)) |
| | | }, |
| | | // 新增用户取消弹窗 |
| | | CanceleditUserdialog() { |
| | | CanceleditUserdialog () { |
| | | this.editUserdialog = false |
| | | const form = this.$refs.editUserform.form |
| | | form.resetFields() |
| | | }, |
| | | // 新增用户确定 |
| | | OkeditUserdialog() { |
| | | OkeditUserdialog () { |
| | | const form = this.$refs.editUserform.form |
| | | form.validateFields((errors, values) => { |
| | | if (!errors) { |
| | |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |