linwei
2024-01-10 ca788e3a4122fbeb46947be76ec21625306fa0a7
src/views/flow/deploy.vue
@@ -5,8 +5,8 @@
</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() {
@@ -18,7 +18,7 @@
          file: {},
        },
        option: {
          labelWidth: 120,
                labelWidth: 96,
          menuBtn: false,
          column: [
            {
@@ -107,27 +107,27 @@
      '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(
@@ -135,18 +135,18 @@
            (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
        }
      },
    }