| | |
| | | return this.userInfo.role_name == 'admin' || this.userInfo.role_name == 'administrator' ? true:false |
| | | } |
| | | }, |
| | | created() { |
| | | if (this.permit){ |
| | | mounted() { |
| | | if (!this.permit){ |
| | | this.getEnterpriseDetailByUserId() |
| | | } |
| | | }, |
| | | methods: { |
| | | handleSubmit(){ |
| | | handleSubmit(row,done){ |
| | | if (this.form.id){ |
| | | update(this.form).then(res=>{ |
| | | if (res.data.code == 200){ |
| | |
| | | }else { |
| | | this.$message.error(res.data.msg) |
| | | } |
| | | done() |
| | | }) |
| | | }else { |
| | | this.form.userId = this.userInfo.user_id |
| | | add(this.form).then(res=>{ |
| | | if (res.data.code == 200){ |
| | | this.$message.success(res.data.msg) |
| | | }else { |
| | | this.$message.error(res.data.msg) |
| | | } |
| | | done() |
| | | }) |
| | | } |
| | | }, |
| | |
| | | if (res.data.code == 200){ |
| | | this.form = res.data.data |
| | | this.form.account = this.userInfo.account |
| | | const group = this.findObject(this.option.group,"account"); |
| | | group.disabled = true |
| | | const account = this.findObject(this.option.group,"account"); |
| | | account.disabled = true |
| | | } |
| | | }) |
| | | } |