parent
e640d8eb4e
commit
4ae9221882
7 changed files with 122 additions and 40 deletions
@ -1,24 +1,31 @@ |
|||||||
import { getDetail, submit } from '@/api/plugin/workflow/draft' |
import { getDetail, submit } from "@/api/plugin/workflow/draft"; |
||||||
|
|
||||||
export default { |
export default { |
||||||
methods: { |
methods: { |
||||||
initDraft(processDefId) { |
initDraft(processDefId) { |
||||||
return new Promise((resolve) => { |
return new Promise((resolve) => { |
||||||
getDetail({ processDefId, platform: 'pc' }).then(res => { |
getDetail({ processDefId, platform: "pc" }).then((res) => { |
||||||
const { data } = res.data |
const { data } = res.data; |
||||||
if (data && data.variables && Object.keys(data.variables).length > 0) resolve(data.variables) |
if (data && data.variables && Object.keys(data.variables).length > 0) |
||||||
}) |
resolve(data.variables); |
||||||
}) |
}); |
||||||
|
}); |
||||||
}, |
}, |
||||||
handleDraft(processDefId, formKey, variables) { |
handleDraft(processDefId, formKey, variables) { |
||||||
this.$confirm('保存至草稿箱并关闭?', '提示', { |
this.$confirm("保存至草稿箱并关闭?", "提示", { |
||||||
type: 'warning' |
type: "warning", |
||||||
}).then(() => { |
|
||||||
submit({ processDefId, formKey, variables: JSON.stringify(variables), platform: 'pc' }).then(() => { |
|
||||||
this.handleCloseTag('/plugin/workflow/process/start') |
|
||||||
}) |
|
||||||
}).catch(() => { |
|
||||||
}) |
}) |
||||||
} |
.then(() => { |
||||||
} |
submit({ |
||||||
} |
processDefId, |
||||||
|
formKey, |
||||||
|
variables: JSON.stringify(variables), |
||||||
|
platform: "pc", |
||||||
|
}).then(() => { |
||||||
|
this.handleCloseTag("/plugin/workflow/process/start"); |
||||||
|
}); |
||||||
|
}) |
||||||
|
.catch(() => {}); |
||||||
|
}, |
||||||
|
}, |
||||||
|
}; |
||||||
|
|||||||
Loading…
Reference in new issue