302 lines
5.0 KiB
JavaScript
302 lines
5.0 KiB
JavaScript
import {getDict} from '@/utils/dictionary'
|
|
export let userStatus = await getDict('user-status')
|
|
export const ORDER_SEARCH_CONFIG = [
|
|
{
|
|
type: 'input',
|
|
prop:'orderId',
|
|
label: '订单号',
|
|
placeholder: '请输入',
|
|
},
|
|
{
|
|
type: 'daterange',
|
|
prop: 'times',
|
|
label: '申请时间',
|
|
valueFormat: 'YYYY-MM-DD',
|
|
placeholder: '请选择申请时间',
|
|
startPlaceholder: '开始日期',
|
|
endPlaceholder: '结束日期',
|
|
rangeSeparator: '-'
|
|
},
|
|
]
|
|
export const USER_SEARCH_CONFIG = [
|
|
{
|
|
type: 'input',
|
|
prop:'name',
|
|
label: '用户名称',
|
|
placeholder: '请输入',
|
|
},
|
|
{
|
|
type: 'select',
|
|
prop:'status',
|
|
label: '状态',
|
|
placeholder: '请选择',
|
|
children:{
|
|
list: [
|
|
{
|
|
label: '全部',
|
|
value: ''
|
|
},
|
|
...userStatus
|
|
]
|
|
},
|
|
},
|
|
{
|
|
type: 'select',
|
|
prop:'type',
|
|
label: '用户类型',
|
|
placeholder: '请选择',
|
|
children:{
|
|
list: [
|
|
{
|
|
label: '全部',
|
|
value: ''
|
|
},
|
|
{
|
|
label: '普通用户',
|
|
value: 1
|
|
},
|
|
{
|
|
label: '讲师',
|
|
value: 2
|
|
}
|
|
]
|
|
},
|
|
},
|
|
{
|
|
type: 'select',
|
|
prop:'user_label',
|
|
label: 'VIP等级',
|
|
placeholder: '请选择',
|
|
children:{
|
|
list: [
|
|
{
|
|
label: '全部',
|
|
value: ''
|
|
},
|
|
{
|
|
label: '注册会员',
|
|
value: 1
|
|
},
|
|
{
|
|
label: 'VIP',
|
|
value: 2
|
|
},
|
|
{
|
|
label: 'SVIP',
|
|
value: 3
|
|
}
|
|
]
|
|
},
|
|
},
|
|
]
|
|
export const ARTICLE_SEARCH_CONFIG = [
|
|
{
|
|
type: 'input',
|
|
prop:'name',
|
|
label: '名称',
|
|
placeholder: '请输入',
|
|
},
|
|
{
|
|
type: 'select',
|
|
prop:'status',
|
|
label: '状态',
|
|
placeholder: '请选择',
|
|
children:{
|
|
list: [
|
|
{
|
|
label: '全部',
|
|
value: ''
|
|
},
|
|
...userStatus
|
|
]
|
|
},
|
|
}
|
|
]
|
|
// 订单列表
|
|
export const ORDER_TABLE_CONFIG = {
|
|
index: true,
|
|
schemes: [
|
|
{
|
|
attrs: {
|
|
label: '订单号',
|
|
prop: 'order_no',
|
|
align: 'center'
|
|
}
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '商品名称',
|
|
prop: 'name',
|
|
align: 'center'
|
|
}
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '价格',
|
|
align: 'center',
|
|
prop: 'price'
|
|
}
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '类型',
|
|
align: 'center',
|
|
prop: 'order_type'
|
|
}
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '状态',
|
|
prop: 'status',
|
|
align: 'center'
|
|
},
|
|
slot: 'status'
|
|
},{
|
|
attrs: {
|
|
label: '创建时间',
|
|
prop: 'CreatedAt',
|
|
align: 'center'
|
|
},
|
|
slot: 'CreatedAt'
|
|
},{
|
|
attrs: {
|
|
label: '更新时间',
|
|
prop: 'UpdatedAt',
|
|
align: 'center'
|
|
},
|
|
slot: 'UpdatedAt'
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '操作',
|
|
prop: 'operate',
|
|
align: 'center'
|
|
},
|
|
slot: 'operate'
|
|
}
|
|
]
|
|
}
|
|
// 用户列表
|
|
export const USER_TABLE_CONFIG = {
|
|
index: true,
|
|
schemes: [
|
|
{
|
|
attrs: {
|
|
label: 'ID',
|
|
prop: 'ID',
|
|
align: 'center'
|
|
}
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '头像',
|
|
prop: 'avatar',
|
|
align: 'center'
|
|
},
|
|
slot: 'avatar'
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '名称',
|
|
prop: 'nick_name',
|
|
align: 'center'
|
|
}
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '状态',
|
|
prop: 'status',
|
|
align: 'center'
|
|
},
|
|
slot: 'status'
|
|
},{
|
|
attrs: {
|
|
label: '创建时间',
|
|
prop: 'CreatedAt',
|
|
align: 'center'
|
|
},
|
|
slot: 'CreatedAt'
|
|
},{
|
|
attrs: {
|
|
label: '用户类别',
|
|
prop: 'user_type',
|
|
align: 'center'
|
|
},
|
|
slot: 'user_type'
|
|
},
|
|
{
|
|
attrs: {
|
|
label: 'VIP',
|
|
prop: 'user_label',
|
|
align: 'center'
|
|
},
|
|
slot: 'user_label'
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '账户余额',
|
|
prop: 'balance',
|
|
align: 'center'
|
|
},
|
|
slot: 'balance'
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '操作',
|
|
prop: 'operate',
|
|
align: 'center'
|
|
},
|
|
slot: 'operate'
|
|
}
|
|
]
|
|
}
|
|
// 文章列表
|
|
export const ARTICLE_TABLE_CONFIG = {
|
|
index: true,
|
|
schemes: [
|
|
{
|
|
attrs: {
|
|
label: '封面',
|
|
prop: 'coverImg',
|
|
align: 'center'
|
|
},
|
|
slot: 'coverImg'
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '名称',
|
|
prop: 'title',
|
|
align: 'center'
|
|
}
|
|
},{
|
|
attrs: {
|
|
label: '价格',
|
|
prop: 'price',
|
|
align: 'center'
|
|
}
|
|
},{
|
|
attrs: {
|
|
label: '创建时间',
|
|
prop: 'CreatedAt',
|
|
align: 'center'
|
|
},
|
|
slot: 'CreatedAt'
|
|
},{
|
|
attrs: {
|
|
label: '更新时间',
|
|
prop: 'UpdatedAt',
|
|
align: 'center'
|
|
},
|
|
slot: 'UpdatedAt'
|
|
},
|
|
{
|
|
attrs: {
|
|
label: '操作',
|
|
prop: 'operate',
|
|
align: 'center'
|
|
},
|
|
slot: 'operate'
|
|
}
|
|
]
|
|
}
|