| | |
| | | } |
| | | }, |
| | | //克隆模板单选框改变 |
| | | selectionChange(row){ |
| | | this.CloneSelect=row; |
| | | //双向绑定,提交表单输入框回填上当前选择的数据 |
| | | this.CloneModel.id=row[0].id; |
| | | this.CloneModel.name=row[0].name; |
| | | //这里有点绕,CloneSelect是我选择框选择的数据。等于this.nodeClickList.oid是因为,克隆模板传递数据要把当前选择树的oid传递给后端。而不是当前要克隆模板的oid |
| | | this.CloneSelect[0].codeclassifyoid=this.nodeClickList.oid |
| | | selectionChange(row) { |
| | | Object.assign(this.CloneModel, row[0]); |
| | | this.CloneSelect = [row[0]]; |
| | | this.CloneSelect[0].codeclassifyoid = this.nodeClickList.oid; |
| | | }, |
| | | //克隆表单提交 |
| | | Clonesubmit(row,done){ |
| | | //重新赋值CloneSelect传递的数据为输入框可以修改的数据,CloneModel提交表单输入框双向绑定数据 |
| | | this.CloneSelect[0].id=this.CloneModel.id; |
| | | this.CloneSelect[0].name=this.CloneModel.name; |
| | | copy(this.CloneSelect[0]).then(()=>{ |
| | | //因为是嵌套弹窗所以手动关闭CloneinnerVisible,CloneVisible两个弹窗。 |
| | | this.CloneinnerVisible=false |
| | | this.CloneVisible=false |
| | | this.$message.success("复制成功") |
| | | this.TemRefresh(); |
| | | done(row) |
| | | }).catch(res=>{ |
| | | done(res) |
| | | }) |
| | | Clonesubmit(row, done) { |
| | | // 重新赋值CloneSelect传递的数据为输入框可以修改的数据,CloneModel提交表单输入框双向绑定数据 |
| | | Object.assign(this.CloneSelect[0], this.CloneModel); |
| | | copy(this.CloneSelect[0]) |
| | | .then(() => { |
| | | // 因为是嵌套弹窗所以手动关闭CloneinnerVisible,CloneVisible两个弹窗。 |
| | | this.CloneinnerVisible = false; |
| | | this.CloneVisible = false; |
| | | this.$message.success("复制成功"); |
| | | this.TemRefresh(); |
| | | done(row); |
| | | }) |
| | | .catch((error) => { |
| | | done(error); |
| | | }); |
| | | }, |
| | | //刷新 |
| | | TemRefresh() { |