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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<template>
  <el-bus-crud v-bind="tableConfig"/>
</template>
 
<script>
export default {
  data() {
    return {
      tableConfig: {
        url: 'flower/api/configCustomer/list',
        newUrl: 'flower/api/configCustomer/new',
        editUrl: 'flower/api/configCustomer/edit',
        deleteUrl: 'flower/api/configCustomer/delete',
        columns: [
          {label: '序号', type: 'index'},
          {label: '类型', prop: 'typeStr'},
          {label: '名称', prop: 'name'},
          {label: '描述', prop: 'description'},
          {label: '图标内容', prop: 'iconContent'},
          {
            label: '图标地址',
            formatter: (row) =>
              row.iconUrl ? (
                <el-bus-image
                  src={row.iconUrl}
                  lazy={true}
                  style="width:50px;height:50px"
                ></el-bus-image>
              ) : null,
          },
          {label: '微信号', prop: 'weixin'},
          {label: '联系方式', prop: 'contact'},
        ],
 
        searchForm: [
          {
            type: 'row',
            items: [{label: '名称:', id: 'name', type: 'input'},
              {label: '类型:', id: 'type', type: 'input'}],
          },
        ],
        form: [
          {
            label: '名称:',
            id: 'name',
            type: 'input',
            rules: {required: true, message: '请输入客服名称'},
          },
          {
            label: '描述:',
            id: 'description',
            type: 'input',
            rules: {required: true, message: '请输入客服描述'},
          },
          {
            label: '图标内容:',
            id: 'iconContent',
            type: 'input',
            rules: {required: true, message: '请输入客服图标内容'},
          },
          {
            label: '背景图片:',
            id: 'iconUrl',
            type: 'bus-upload',
            el: {
              listType: 'picture-card',
              limit: 1,
              limitSize: 2,
              tipText: '大小不超过2M',
              valueType: 'string',
            },
            forceDisabled: true,
            rules: {
              required: true,
              message: '请上传背景图片',
              trigger: 'blur',
            },
          },
          {
            label: '微信号',
            id: 'weixin',
            type: 'input',
            rules: {required: true, message: '请输入客服关联微信号'},
          },
          {
            label: '类型', id: 'type',
            type: 'bus-select-dict',
            el: {
              code: 'CONFIG_CUSTOMER_CONTACT',
              style: 'width:100%',
            },
          },
          {
            label: '联系方式:',
            id: 'contact',
            type: 'input',
            rules: {required: false, message: '请输入联系方式'},
          },
        ],
      },
    }
  },
  head() {
    return {
      title: '客服电话',
    }
  },
}
</script>