| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {deployUpload} from "@/api/flow/flow"; |
| | | import {flowCategory} from "@/util/flow"; |
| | | import { deployUpload } from "@/api/flow/flow" |
| | | import { flowCategory } from "@/util/flow" |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | file: {}, |
| | | }, |
| | | option: { |
| | | labelWidth: 120, |
| | | labelWidth: 96, |
| | | menuBtn: false, |
| | | column: [ |
| | | { |
| | |
| | | 'form.flowMode'() { |
| | | this.$refs.form.option.column.filter(item => { |
| | | if (item.prop === "tenantId") { |
| | | item.display = this.form.flowMode === 2; |
| | | item.display = this.form.flowMode === 2 |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | methods: { |
| | | uploadBefore(file, done) { |
| | | this.$message.success('部署开始'); |
| | | this.file = file; |
| | | this.$message.success('部署开始') |
| | | this.file = file |
| | | done() |
| | | }, |
| | | uploadAfter(res, done, loading) { |
| | | if (!this.form.flowCategory) { |
| | | this.$message.warning('清先选择流程类型'); |
| | | this.$message.warning('清先选择流程类型') |
| | | loading() |
| | | return false; |
| | | return false |
| | | } |
| | | if (this.form.flowMode === 2 && !this.form.tenantId) { |
| | | this.$message.warning('清先选择对应租户'); |
| | | loading(); |
| | | return false; |
| | | this.$message.warning('清先选择对应租户') |
| | | loading() |
| | | return false |
| | | } |
| | | if (res.success) { |
| | | deployUpload( |
| | |
| | | (this.form.tenantId) ? this.form.tenantId.join(",") : "", |
| | | [this.file] |
| | | ).then(res => { |
| | | const data = res.data; |
| | | const data = res.data |
| | | if (data.success) { |
| | | done() |
| | | } else { |
| | | this.$message.error(data.msg); |
| | | this.$message.error(data.msg) |
| | | loading() |
| | | } |
| | | }) |
| | | } else { |
| | | this.$message.warning('请上传 bpmn20.xml 标准格式文件'); |
| | | this.$message.warning('请上传 bpmn20.xml 标准格式文件') |
| | | loading() |
| | | return false; |
| | | return false |
| | | } |
| | | }, |
| | | } |