cloudroam
2025-03-28 cef2bb0eeeb91a22860cf5d23c7348af1ba921dc
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
<template>
  <el-bus-crud v-bind="tableConfig" />
</template>
 
<script>
import { getSortConfig } from '@/utils/form-item-config'
export default {
  data() {
    return {
      tableConfig: {
        url: 'flower/api/flower/param/list',
        dialogNeedRequest: true,
        extraButtons: [
          {
            text: '参数列表',
            atClick: (row) => {
              this.$router.push(`${this.$route.path}/${row.id}`)
            },
          },
        ],
        columns: [
          { label: '参数模板名称', prop: 'name' },
          { label: '关联分类', prop: 'categories' },
          { label: '创建时间', prop: 'createTime' },
        ],
        searchForm: [
          {
            type: 'row',
            items: [
              { label: '参数模板名称', id: 'name', type: 'input' },
              {
                label: '商品分类',
                id: 'categoryId',
                type: 'bus-cascader',
                el: {
                  otherInterfaceUri: 'flower/api/flower/category/tree',
                  props: {
                    label: 'name',
                    value: 'id',
                    emitPath: false,
                  },
                  style: 'width:100%',
                },
              },
            ],
          },
        ],
        form: [
          {
            label: '参数模板名称:',
            id: 'name',
            type: 'input',
            rules: {
              required: true,
              message: '请输入参数模板名称',
              trigger: 'blur',
            },
          },
          {
            label: '商品分类:',
            id: 'categoryIds',
            type: 'bus-cascader',
            el: {
              otherInterfaceUri: 'flower/api/flower/category/tree',
              props: {
                label: 'name',
                value: 'id',
                multiple: true,
                emitPath: false,
              },
              style: 'width:100%',
            },
            str: true,
            strKey: 'categories',
          },
          {
            ...getSortConfig(),
          },
        ],
      },
    }
  },
  head() {
    return {
      title: '参数模板',
    }
  },
}
</script>