| | |
| | | // 新增 |
| | | async handleSave(row, done, loading) { |
| | | console.log(row) |
| | | const response = await flowpathSave({ ...row, ...{ templateId: this.code } }) |
| | | if (response.status === 200) { |
| | | loading() |
| | | await flowpathSave({ ...row, ...{ templateId: this.code } }).then(response=>{ |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '新增数据成功!' |
| | | type: 'success', |
| | | message: '新增数据成功!' |
| | | }) |
| | | done() |
| | | this.getDataList() |
| | | } |
| | | } |
| | | }).catch(res=>{ |
| | | loading() |
| | | }) |
| | | |
| | | }, |
| | | // 编辑 |
| | |
| | | console.log(row) |
| | | const { modelName, modelKey, buttonTypeKey, id ,description} = row |
| | | let param = { modelName, modelKey, buttonTypeKey, id,description } |
| | | const response = await flowpathSave({ ...param, ...{ templateId: this.code } }) |
| | | if (response.status === 200) { |
| | | loading() |
| | | await flowpathSave({ ...param, ...{ templateId: this.code } }).then(response=>{ |
| | | if (response.status === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '修改数据成功!' |
| | | type: 'success', |
| | | message: '修改数据成功!' |
| | | }) |
| | | done() |
| | | this.getDataList() |
| | | } |
| | | } |
| | | }).catch(()=>{ |
| | | //loading控制禁用 默认是开启 |
| | | loading() |
| | | }) |
| | | |
| | | }, |
| | | // 删除单条 |