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
| <template>
| <GlobalAlertWindow
| :title="title"
| :visible.sync="visible"
| :confirm-working="isWorking"
| @confirm="confirm"
| >
| <el-form :model="form" ref="form" :rules="rules" label-width="100px" label-suffix=":" inline>
|
| <el-form-item label="标题" prop="title">
| <el-input v-model="form.title" placeholder="请输入标题" v-trim/>
| </el-form-item>
| <el-form-item label="内容" prop="content">
| <el-input
| type="textarea"
| v-model="form.content"
| placeholder="请输入内容"
| :autosize="{ minRows: 4, maxRows: 12}"
| v-trim
| />
| </el-form-item>
| <el-form-item label="通知对象" prop="notifyObject">
| <el-radio-group v-model="form.notifyObject">
| <el-radio label="0">用户</el-radio>
| <el-radio label="1">商家</el-radio>
| </el-radio-group>
| </el-form-item>
| </el-form>
| </GlobalAlertWindow>
| </template>
|
| <script>
| import BaseOpera from '@/components/base/BaseOpera'
| import GlobalAlertWindow from '@/components/common/GlobalAlertWindow'
| export default {
| name: 'OperaNoticeWindow',
| extends: BaseOpera,
| components: { GlobalAlertWindow },
| data () {
| let rule = (rule, value, callBack) => {
| debugger
| console.log(rule, value);
| callBack()
| }
| return {
| // 表单数据
| form: {
| id: null,
|
| title: '',
| content: '',
| notifyObject: '0',
|
| },
| // 验证规则
| rules: {
| title: [
| { required: true, message: '请输入标题', tigger: 'blur' }
| ],
| content: [
| { required: true, message: '请输入内容', tigger: 'blur' }
| ],
| notifyObject: [
| { required: true, message: '请输入选择通知对象', tigger: 'change' }
| ],
| }
| }
| },
| created () {
| this.config({
| api: '/business/notice',
| 'field.id': 'id'
| })
| },
| methods: {
| // confirm() {
| // console.log(this.form);
| // }
| },
| }
| </script>
|
| <style lang="scss" scoped>
| @import '@/assets/style/alertstyle.scss';
| </style>
|
|