大件运输联网系统前端代码
guoshilong
2023-01-02 dd0838214cd86dcdec93c89687a7e6f457b58dc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<template>
  <div>
    <basic-container>
      <avue-form :option="option" v-model="form" @submit="handleSubmit">
 
        <template slot="noType" slot-scope="{item,value,label}">
          <span>申请编号:{{item.no}}---申请时间:{{item.createTime}}---到期时间:{{item.endPassTime}}</span>
        </template>
 
      </avue-form>
    </basic-container>
    <basic-container>
      <flow-design :is-display="true" :process-definition-id="processDefinitionId"></flow-design>
    </basic-container>
  </div>
</template>
 
<script>
 
import option from "@/const/applicationDelay/applicationDelay"
import {startDelayProcess} from "@/api/applicationDelay/applicationDelay";
 
export default {
  name: "form",
  data() {
    return {
      processDefinitionId: '',
      form: {},
      option: option
    }
  },
  watch:{
    'form.passTime':{
      handler(newVal){
        this.form.delayStartTime = newVal[0]
        this.form.delayEndTime = newVal[1]
      }
    }
  },
  created() {
    this.processDefinitionId = this.$route.params.processDefinitionId;
  },
  methods: {
    handleSubmit() {
      const params = {
        processDefinitionId: this.$route.params.processDefinitionId,
        ...this.form,
      };
      startDelayProcess(params).then(resp => {
        const data = resp.data;
        if (data.success) {
          this.$message.success(data.msg);
          this.$router.$avueRouter.closeTag();
          this.$router.push({path: `/work/start`});
        } else {
          this.$message.error(data.msg || '提交失败');
        }
      });
    }
  }
}
</script>
 
<style scoped>
 
</style>