guoshilong
2022-11-23 998b75f0d4aaed03001ec4246cd4f3b4b0743b7e
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
93
94
<!--事件处置弹窗页面-->
<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 {disposalRefuse} from "@/api/eventgm/eventgm";
 
export default {
  data() {
    return {
      title:"事件处置",
      form: {},
      visible: false,
      eventgm: null,
      option: {
        emptyBtn: false,
        submitText: "保存",
        gutter: 30,
        column: [
          {
            label: "事件状态",
            prop: "state",
            type: "select",
            disabled:true,
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=EVENT_STATE",
            dataType: "number",
            props: {
              label: "dictValue",
              value: "dictKey"
            },
            rules: [{
              required: true,
              message: "请选择事件状态",
              trigger: "blur"
            }]
 
          },
          {
            label: "备注",
            prop: "remark",
            type: "textarea",
            span: 24,
            rules: [{
              required: true,
              message: "请输入备注",
              trigger: "blur"
            }]
          }
        ]
      }
    }
  },
  methods: {
    init(eventgm) {
      this.visible = true
      this.eventgm = eventgm
      this.form.state = 10
    },
    // 表单提交
    submit(row,done) {
      var that = this
      row['id'] = that.eventgm.id
      disposalRefuse(row).then(() => {
        this.$refs.form.resetFields()
        this.$emit("refreshOnLoad")
        that.visible = false
        that.$message({
          type: "success",
          message: "操作成功!"
        });
        done();
      }, error => {
        done();
        console.log(error);
      });
    }
  }
}
</script>
 
<style scoped>
 
</style>