Blame view

frontend/front/src/views/matter/myTask/ApprovalDialog.vue 1.77 KB
8ea9c133   陈威   初始化提交
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<template>
  <el-dialog
    :visible.sync="dialogVisible"
    width="70%"
    top="8vh"
    :show-close="false"
    :close-on-click-modal="false"
    append-to-body
    custom-class="approval-dialog"
  >
    <approval-form
      v-if="dialogVisible"
      :current-task-id="currentTaskId"
      :current-inst-id="currentInstId"
      :current-learder-id="currentLearderId"
      @close-dialog="handleCloseDialog"
    />
  </el-dialog>
</template>

<script>
  import ApprovalForm from '../ApprovalForm.vue'
  export default {
    name: 'ApprovalDialog',
    components: {
      ApprovalForm,
    },
    props: {
      currentTaskId: {
        type: String,
        default: '',
      },
      currentInstId: {
        type: String,
        default: '',
      },
      currentLearderId: {
        type: String,
        default: '',
      },
    },
    data() {
      return {
        dialogVisible: false,
      }
    },

    methods: {
      openApprovalFormDialog() {
        this.dialogVisible = true
        if (this.currentLearderId != '') {
          this.$router.currentRoute.query.leaderId = this.currentLearderId
        }
      },
      handleCloseDialog() {
        this.dialogVisible = false
        this.$emit('close-approval-dialog')
      },
    },
  }
</script>

<style lang="scss" scoped>
  ::v-deep.el-dialog__wrapper {
    .approval-dialog {
      height: calc(100% - 16vh);
      .el-dialog__header {
        padding: 0;
      }
      .el-dialog__body {
        padding: 0;
        height: 100%;
        .approval-form {
          height: 100%;
          border: 0;
          margin-bottom: 0;
          .task-form {
            // width: 95%;
            .approval-buttons {
              border-top: 1px solid $base-border-color;
            }
          }
        }
      }
    }
  }
</style>