detailDialog.vue
1.65 KB
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>
<!-- 编辑 -->
<dialogBox title="编辑" @closeDialog="closeDialog" @submitForm="handleSubmit" v-model="myValue">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
<el-row>
<el-col :span="6">
<el-form-item label="规则编码" prop="gzbm">
<el-input v-model="ruleForm.gzbm" placeholder="规则编码"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规则名称" prop="gzmc">
<el-input v-model="ruleForm.gzmc" placeholder="规则名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否启用" prop="isqy">
<el-radio-group v-model="ruleForm.isqy">
<el-radio :label="1">是</el-radio>
<el-radio :label="2">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
</dialogBox>
</template>
<script>
export default {
props: {
value: { type: Boolean, default: false },
},
data () {
return {
myValue: this.value,
ruleForm: {
gzbm: '',
xzqmc: '',
isqy: 1
},
rules: {
gzbm: [
{ required: true, message: '规则编码', trigger: 'blur' }
],
gzmc: [
{ required: true, message: '规则名称', trigger: 'blur' }
]
}
}
},
watch: {
value (val) {
this.myValue = val
}
},
methods: {
closeDialog () {
this.$emit('input', false)
},
handleSubmit () {
this.$emit('input', false)
}
}
}
</script>