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
<template>
  <a-modal :visible="visible" title="维护停机" @ok="handleSubmit" @cancel="handleCancel">
    <a-form-model ref="form" :model="model" :rules="validateRules" :labelCol="{span:5}" :wrapperCol="{span:18}">
      <a-form-model-item prop="closeReason" label="停机原因">
        <a-select v-model="model.closeReason" placeholder="请选择停机原因">
          <a-select-option v-for="item in closeReasonList" :key="item.id">
            {{item.label}}
          </a-select-option>
        </a-select>
      </a-form-model-item>
    </a-form-model>
  </a-modal>
</template>
 
<script>
  export default {
    name: 'MaintainShutdownModal',
    data() {
      return {
        visible: false,
        model: {},
        validateRules: {
          closeReason: [{ required: true, message: '请选择停机原因!' }]
        },
        closeReasonList: [
          {
            id: 1,
            label: '吃饭时间休息'
          },
          {
            id: 2,
            label: '工作时间休息'
          },
          {
            id: 3,
            label: '计划性停电'
          },
          {
            id: 4,
            label: '待料停机'
          },
          {
            id: 5,
            label: '首件调试'
          },
          {
            id: 6,
            label: '刀量具准备'
          }
        ]
      }
    },
    methods: {
      handleSubmit() {
 
      },
 
      handleCancel() {
        this.$refs.form.clearValidate()
        this.visible = false
      }
    }
  }
</script>
 
<style scoped>
 
</style>