对比新文件 |
| | |
| | | <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> |