guoshilong
2022-09-23 e4e92ce9eee6d39ae6bddaeca8f212d9b3b52ecc
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
88
89
90
91
92
<!--生成维修工单页面-->
<template>
  <el-dialog
    :title="title"
    :modal-append-to-body="false"
    :append-to-body="true"
    :close-on-click-modal="false"
    width="60%"
    :visible.sync="visible"
  >
    <avue-form ref="form" v-model="form" :option="option" @submit="submit">
    </avue-form>
  </el-dialog>
</template>
 
<script>
import {disposalAccept} from "@/api/eventgm/eventgm";
 
export default {
  name: "repairsOrder",
  data() {
    return {
      title:"生成维修工单",
      form: {},
      repairsorder: {},
      visible: false,
      ids: null,
      option: {
        emptyBtn: false,
        submitText: "保存",
        gutter: 30,
        column: [
          {
            label: "地址",
            prop: "address",
            disabled:true,
            span: 24
          },
          {
            label: "经度",
            prop:"longitude",
            disabled:true,
            span: 12
          },
          {
            label: "纬度",
            prop:"latitude",
            disabled:true,
            span: 12
          },
          {
            label: "内容",
            prop: "remark",
            type: "textarea",
            span: 24,
            rules: [{
              required: true,
              message: "请输入备注",
              trigger: "blur"
            }]
          }
        ]
      }
    }
  },
  methods: {
    init(data) {
      this.visible = true
      this.form = data
    },
    // 表单提交
    submit(row, done) {
      disposalAccept(row).then(() => {
        this.$emit("refreshOnLoad")
        this.visible = false
        this.$message({
          type: "success",
          message: "操作成功!"
        });
        done();
      }, error => {
        done();
        window.console.log(error);
      });
    },
  }
}
</script>
 
<style scoped>
 
</style>