Commit a02cf37a by 李宁

1

1 parent 2db8e81c
...@@ -425,13 +425,21 @@ const handleDeleteConfirm = async (id: string) => { ...@@ -425,13 +425,21 @@ const handleDeleteConfirm = async (id: string) => {
} }
const handleDownloadTemplate = () => { const handleDownloadTemplate = () => {
const template = '业务名称,业务代码,预计酬金\n示例业务,BEXAMPLE,100' try {
const blob = new Blob([template], { type: 'text/csv;charset=utf-8;' }) // 创建下载链接
const link = document.createElement('a') const link = document.createElement('a')
link.href = URL.createObjectURL(blob) // 使用相对路径,确保本地和线上都能正常访问
link.download = '业务规则批量上传模板.csv' link.href = '/static/file/rule_tem.xlsx'
link.click() link.download = '业务规则批量上传模板.xlsx'
ElMessage.success('模板下载成功') document.body.appendChild(link)
link.click()
document.body.removeChild(link)
ElMessage.success('模板下载成功')
} catch (error) {
console.error('下载模板失败:', error)
ElMessage.error('模板下载失败,请稍后重试')
}
} }
const handleBatchUpload = () => { const handleBatchUpload = () => {
......
...@@ -434,54 +434,7 @@ interface Organization { ...@@ -434,54 +434,7 @@ interface Organization {
children?: Organization[] children?: Organization[]
} }
// 角色管理数据 // 角色管理数据
const roles = ref<Role[]>([ const roles = ref<Role[]>()
{
id: 'role-001',
name: '区县全权管理员',
description: '拥有区县级别的所有管理权限,可以管理订单、用户和业务规则',
level: '区县级',
permissions: [
'order',
'order:view',
'order:complete',
'order:reward',
'order:approve',
'business',
'business:view',
'business:create',
'business:edit',
'system',
'system:role',
'system:role:view',
'system:role:create',
'system:role:edit',
'system:account',
'system:account:view',
'system:account:create',
'system:account:edit'
] as string[],
status: '启用',
createTime: '2025-10-20 09:00:00'
},
{
id: 'role-002',
name: '订单管理员',
description: '负责订单的日常管理和处理',
level: '一线人员',
permissions: ['order', 'order:view', 'order:complete', 'order:reward', 'order:approve'] as string[],
status: '启用',
createTime: '2025-10-20 09:30:00'
},
{
id: 'role-003',
name: '业务酬金管理员',
description: '负责业务酬金的配置和维护',
level: '区县级',
permissions: ['business', 'business:view', 'business:create', 'business:edit'] as string[],
status: '启用',
createTime: '2025-10-20 10:00:00'
}
])
// 权限数据 // 权限数据
const permissions = ref<Permission[]>(userInfo.value.functions || []) const permissions = ref<Permission[]>(userInfo.value.functions || [])
// 根据订单ID获取订单详情 // 根据订单ID获取订单详情
...@@ -626,57 +579,7 @@ const handleUpdateRole = (roleId: string, updates: any) => { ...@@ -626,57 +579,7 @@ const handleUpdateRole = (roleId: string, updates: any) => {
} }
} }
// 组织架构数据 // 组织架构数据
const organizations = ref<Organization[]>([ const organizations = ref<Organization[]>()
{
id: 'org-001',
name: '杭州市移动',
type: '地市',
children: [
{
id: 'org-002',
name: '西湖区',
type: '区县',
parentId: 'org-001',
children: [
{
id: 'org-005',
name: '客户经理团队',
type: '客户经理团队',
parentId: 'org-002'
}
]
},
{
id: 'org-003',
name: '滨江区',
type: '区县',
parentId: 'org-001',
children: [
{
id: 'org-006',
name: '客户经理团队',
type: '客户经理团队',
parentId: 'org-003'
}
]
},
{
id: 'org-004',
name: '余杭区',
type: '区县',
parentId: 'org-001',
children: [
{
id: 'org-007',
name: '客户经理团队',
type: '客户经理团队',
parentId: 'org-004'
}
]
}
]
}
])
// 生命周期 // 生命周期
onMounted(() => { onMounted(() => {
......
...@@ -410,7 +410,7 @@ const getAccountList = async ()=>{ ...@@ -410,7 +410,7 @@ const getAccountList = async ()=>{
userCode: codeSearch.value, userCode: codeSearch.value,
userType: accountTypeFilter.value, userType: accountTypeFilter.value,
status: statusFilter.value, status: statusFilter.value,
areaCode: organizationFilter.value, areaId: organizationFilter.value,
page: 1, page: 1,
pageSize: 1000 pageSize: 1000
}) })
...@@ -677,7 +677,7 @@ const organizationOptions = computed(() => { ...@@ -677,7 +677,7 @@ const organizationOptions = computed(() => {
const traverse = (orgs: Organization[], depth = 0) => { const traverse = (orgs: Organization[], depth = 0) => {
const prefix = depth > 0 ? '— '.repeat(depth) : '' const prefix = depth > 0 ? '— '.repeat(depth) : ''
orgs.forEach(org => { orgs.forEach(org => {
result.push({ id: org.areaCode, label: `${prefix}${org.name}` }) result.push({ id: org.id, label: `${prefix}${org.name}` })
if (org.children && org.children.length) traverse(org.children, depth + 1) if (org.children && org.children.length) traverse(org.children, depth + 1)
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!