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
| <template>
| <div class="custom-crud-page">
| <el-bus-crud v-bind="tableConfig"></el-bus-crud>
| </div>
| </template>
|
| <script>
| export default {
| data() {
| return {
| tableConfig: {
| url: 'flower/api/code/type/list',
| newUrl: 'flower/api/code/type/add',
| editUrl: 'flower/api/code/type/edit',
| deleteUrl: 'flower/api/code/type/delete',
| deleteMessage: () => '此操作将永久删除该字典及所有字典项,是否继续?',
| extraButtons: [
| {
| text: '字典项',
| atClick: (row) => {
| return new Promise((resolve) => {
| this.$router.push(`${this.$route.path}/${row.code}`)
| resolve(false)
| })
| },
| },
| ],
| columns: [
| { label: '序号', type: 'index' },
| { label: '名称', prop: 'name' },
| { label: '类型', prop: 'code' },
| { label: '备注信息', prop: 'description' },
| { label: '更新时间', prop: 'updateTime' },
| ],
| searchForm: [
| {
| type: 'row',
| span: 6,
| items: [
| {
| label: '名称',
| id: 'name',
| type: 'input',
| el: { placeholder: '请输入名称' },
| },
| {
| label: '类型',
| id: 'code',
| type: 'input',
| el: { placeholder: '请输入类型' },
| },
| ],
| },
| ],
| form: [
| {
| label: '名称:',
| id: 'name',
| type: 'input',
| rules: { required: true, message: '请输入名称', trigger: 'blur' },
| },
| {
| label: '类型:',
| id: 'code',
| type: 'input',
| rules: { required: true, message: '请输入类型', trigger: 'blur' },
| },
| {
| label: '备注:',
| id: 'description',
| type: 'input',
| el: {
| type: 'textarea',
| rows: '6',
| },
| },
| ],
| },
| }
| },
| head() {
| return {
| title: '字典管理',
| }
| },
| }
| </script>
|
|