export const columnList = [ { page: 'user', columns: [ { title: '用户ID', dataIndex: 'user_id', key: 'user_id', ellipsis: true, // filterable: true, fixed: 'left' }, { title: '用户名', dataIndex: 'account', key: 'account' // filterable: true }, { title: '姓名', dataIndex: 'name', key: 'name', ellipsis: true // filterable: true }, { title: '性别', dataIndex: 'gender', key: 'gender', scopedSlots: { customRender: 'gender' } }, { title: '年龄', dataIndex: 'age', key: 'age' }, { title: '手机号', dataIndex: 'phone', key: 'phone' }, { title: '邮箱', dataIndex: 'email', key: 'email' }, { title: '角色名称', dataIndex: 'role_name', key: 'role_name' }, { title: '操作', dataIndex: 'operate', key: 'operate', scopedSlots: { customRender: 'action' } } ] }, { page: 'role', columns: [ { title: '角色ID', dataIndex: 'role_id', key: 'role_id', ellipsis: true, // filterable: true, fixed: 'left' }, { title: '角色名称', dataIndex: 'name', key: 'name' // filterable: true }, { title: '角色描述', dataIndex: 'describe', key: 'describe', ellipsis: true // filterable: true }, { title: '关联权限', dataIndex: 'permission', key: 'permission', scopedSlots: { customRender: 'permission' } }, { title: '是否启用', dataIndex: 'is_open', key: 'is_open', scopedSlots: { customRender: 'is_open' } }, { title: '创建时间', dataIndex: 'create_time', key: 'create_time' }, { title: '更新时间', dataIndex: 'update_time', key: 'update_time' }, { title: '操作', dataIndex: 'operate', key: 'operate', scopedSlots: { customRender: 'action' } } ] }, { page: 'permission', columns: [ { title: '权限ID', dataIndex: 'permission_id', key: 'permission_id', ellipsis: true, // filterable: true, fixed: 'left' }, { title: '权限名称', dataIndex: 'name', key: 'name' // filterable: true }, { title: '权限描述', dataIndex: 'describe', key: 'describe', ellipsis: true // filterable: true }, { title: '是否启用', dataIndex: 'is_open', key: 'is_open', scopedSlots: { customRender: 'is_open' } } // { // title: '操作', // dataIndex: 'operate', // key: 'operate', // scopedSlots: { customRender: 'action' } // } ] }, { page: 'station', columns: [ { title: '场站ID', dataIndex: 'station_id', key: 'station_id', ellipsis: true, // filterable: true, fixed: 'left' }, { title: '场站名称', dataIndex: 'name', key: 'name' // filterable: true }, { title: '场站位置', dataIndex: 'address', key: 'address' // filterable: true }, { title: '场站经度', dataIndex: 'lon', key: 'lon' }, { title: '场站纬度', dataIndex: 'lat', key: 'lat' }, { title: '储能容量', dataIndex: 'capacity', key: 'capacity' // filterable: true }, { title: '场站电话', dataIndex: 'tel', key: 'tel', ellipsis: true // filterable: true }, { title: '储能容量', dataIndex: 'capacity', key: 'capacity' }, { title: '场站状态', dataIndex: 'status', key: 'status', scopedSlots: { customRender: 'status' } }, { title: '场站运行模式', dataIndex: 'work_mode', key: 'work_mode', scopedSlots: { customRender: 'work_mode' } }, { title: '场站运行策略', dataIndex: 'policy_id', key: 'policy_id', scopedSlots: { customRender: 'policy_id' } }, { title: '操作', dataIndex: 'operate', key: 'operate', scopedSlots: { customRender: 'action' } } ] }, { page: 'serviceApi', columns: [ { title: '接口ID', dataIndex: 'api_id', key: 'api_id', ellipsis: true, // filterable: true, fixed: 'left' }, { title: '接口名称', dataIndex: 'name', key: 'name' // filterable: true }, { title: '接口描述', dataIndex: 'describe', key: 'describe' // filterable: true }, { title: '接口参数', dataIndex: 'params', key: 'params' }, { title: '是否启用', dataIndex: 'is_open', key: 'is_open', scopedSlots: { customRender: 'is_open' } }, { title: '操作', dataIndex: 'operate', key: 'operate', scopedSlots: { customRender: 'action' } } ] } ] export const userOptions = [ { title: '基础信息', icon: 'icon-xinxi', list: [ { label: '用户名', value: '', key: 'account', type: 'input' }, { label: '姓名', value: '', key: 'name', type: 'input' }, { label: '性别', value: undefined, key: 'gender', type: 'select', list: [ { label: '女', value: '0' }, { label: '男', value: '1' } ] }, { label: '年龄', value: '', key: 'age', type: 'input' }, { label: '手机号', value: '', key: 'phone', type: 'input' }, { label: '邮箱', value: '', key: 'email', type: 'input' }, { label: '角色名称', value: undefined, //根据角色id回显角色 key: 'role_id', type: 'slot', slotName: 'role_id' } ], ruleForm: {} } ] export const roleOptions = [ { title: '基础信息', icon: 'icon-xinxi', list: [ { label: '角色名称', value: '', key: 'name', type: 'input' }, { label: '关联权限', value: '', key: 'permission', type: 'slot', slotName: 'treetable', className: 'item-l', tableData: [], selectTableData: [], columns: [ { title: '名称', dataIndex: 'name', key: 'name', ellipsis: true, filterable: true, fixed: 'left' }, { title: '页面路径', dataIndex: 'route', key: 'route' // filterable: true }, { title: '是否允许新增操作', dataIndex: 'is_add', key: 'is_add', align: 'center', scopedSlots: { customRender: 'is_add' } }, { title: '是否允许删除操作', dataIndex: 'is_del', key: 'is_del', align: 'center', scopedSlots: { customRender: 'is_del' } }, { title: '是否允许编辑操作', dataIndex: 'is_edit', key: 'is_edit', align: 'center', scopedSlots: { customRender: 'is_edit' } }, { title: '是否允许查看操作', dataIndex: 'is_view', key: 'is_view', align: 'center', scopedSlots: { customRender: 'isQuery' } } ] }, { // 0:禁用; 1:启用 label: '是否启用', value: undefined, key: 'is_open', type: 'switch', className: 'item-l', list: [ { label: '禁用', value: '0' }, { label: '启用', value: '1' } ] }, { label: '角色描述', value: '', key: 'describe', type: 'textarea' } ], ruleForm: {} } ] export const stationOptions = [ { title: '基础信息', icon: 'icon-xinxi', list: [ { label: '场站名称', value: '', key: 'name', type: 'input' }, { label: '场站位置', value: '', key: 'address', type: 'input' }, { label: '场站经度', value: '', key: 'lon', type: 'input' }, { label: '场站纬度', value: '', key: 'lat', type: 'input' }, { label: '储能容量', value: '', key: 'capacity', type: 'input' }, { label: '场站电话', value: '', key: 'tel', type: 'input' }, { // 0:未启用,1:启用 label: '场站状态', value: undefined, key: 'status', type: 'switch', className: 'item-l', list: [ { label: '未启用', value: '0' }, { label: '启用', value: '1' } ] }, { // 0:未启用,1:启用 label: '场站运行模式', value: undefined, key: 'work_mode', type: 'select', list: [ { label: '最优经济化', value: '1' }, { label: '支撑电网稳定', value: '2' }, { label: '自定义', value: '3' } ] }, { // 0:未启用,1:启用 label: '场站运行策略', value: undefined, key: 'policy_id', type: 'select', list: [ { label: '削峰套利', value: '1' }, { label: '需求响应', value: '2' }, { label: '自发自用', value: '3' } ] } ], ruleForm: {} } ] export const serviceApiOptions = [ { title: '基础信息', icon: 'icon-xinxi', list: [ { label: '接口名称', value: '', key: 'name', type: 'input' }, { label: '接口参数', value: '', key: 'params', type: 'input' }, { label: '接口描述', value: '', key: 'describe', type: 'textarea' }, { label: '是否启用', value: '', key: 'is_open', type: 'switch', className: 'item-l', list: [ { label: '禁用', value: '0' }, { label: '启用', value: '1' } ] } ], ruleForm: {} } ] export const userFormRules = { account: [ { trigger: 'blur', required: true, message: '请输入用户名' } ], name: [ { trigger: 'blur', required: true, message: '请输入姓名' } ] } export const roleFormRules = { name: [ { trigger: 'blur', required: true, message: '请输入角色名称' } ] } export const stationFormRules = { name: [ { trigger: 'blur', required: true, message: '请输入场站名称' } ] } export const serviceApiFormRules = { name: [ { trigger: 'blur', required: true, message: '请输入接口名称' } ] }