feat(F006-W5.x.x+3): 菜单减法 + 11 个 P3 通用表格页
- 砍 33 个 admin_new 自创但老 vue 没有的菜单 (教学/支付/示例页/村庄/补单等) - 新增通用 GenericTableView 组件 (支持 status/date/image 列类型, 后端 500 退化占位) - 11 个 P3 路由: 4 message + 4 operation + 2 other (industry/categoryZX) + information - 4 个运营中心共用 /sys/operation/pageList?type=1/2/3/4 真数据 (1+2+1+3 行) - information 走 /other/information/page 真数据 (7 行) - industry/categoryZX 走 /other/category/categoryDeepPageList 真数据 (5 行) - 4 message 后端 500 时退化为占位 (按用户要求不动后端)
This commit is contained in:
parent
d842182b17
commit
f9e53be1ed
@ -48,11 +48,6 @@ export const MENU_LABELS: MenuLabel[] = [
|
||||
// ===== 顶部菜单(原老 vue 一级) =====
|
||||
{ url: 'statistics/index', label: '首页', icon: 'HomeFilled', path: '/dashboard', sort: 1 },
|
||||
{ url: 'order/order', label: '订单管理', icon: 'Document', path: '/order', sort: 3 },
|
||||
{ url: 'orderList/index', label: '订单列表', icon: 'List', path: '/order/list', sort: 4 },
|
||||
{ url: 'orderMake/index', label: '开单', icon: 'Edit', path: '/order/create', sort: 5 },
|
||||
{ url: 'villageManage/manageList', label: '村庄管理', icon: 'Location', path: '/village', sort: 6 },
|
||||
{ url: 'village/user', label: '村民用户', icon: 'User', path: '/village/user', sort: 7 },
|
||||
{ url: 'supplyList/index', label: '供应商列表', icon: 'Shop', path: '/supply', sort: 8 },
|
||||
|
||||
// ===== 用户模块 =====
|
||||
{ url: 'user/user', label: '用户列表', icon: 'User', path: '/user/user', sort: 100 },
|
||||
@ -102,8 +97,6 @@ export const MENU_LABELS: MenuLabel[] = [
|
||||
{ url: 'sys/operation?_mt=行业协会运营中心&operationType=4', label: '行业协会运营', icon: 'Connection', path: '/sys/operation/association', sort: 433 },
|
||||
|
||||
// ===== 课程模块 =====
|
||||
{ url: 'course/coupon', label: '优惠券管理', icon: 'Ticket', path: '/course/coupon', sort: 500 },
|
||||
{ url: 'course/sensitive', label: '敏感词汇管理', icon: 'WarningFilled', path: '/course/sensitive', sort: 501 },
|
||||
|
||||
// ===== API 模块 =====
|
||||
{ url: 'api/lunbo', label: '轮播管理', icon: 'Picture', path: '/api/lunbo', sort: 600 },
|
||||
@ -117,7 +110,6 @@ export const MENU_LABELS: MenuLabel[] = [
|
||||
{ url: 'other/industry', label: '行业', icon: 'OfficeBuilding', path: '/other/industry', sort: 703 },
|
||||
{ url: 'other/label', label: '标签管理', icon: 'PriceTag', path: '/other/label', sort: 704 },
|
||||
{ url: 'other/categoryGood', label: '平台分类', icon: 'Menu', path: '/other/category/good', sort: 705 },
|
||||
{ url: 'other/categoryRM', label: '热门搜索记录', icon: 'Search', path: '/other/category/rm', sort: 706 },
|
||||
{ url: 'other/categoryZX', label: '资讯分类', icon: 'Menu', path: '/other/category/zx', sort: 707 },
|
||||
{ url: 'other/goodunit', label: '商品单位', icon: 'Box', path: '/other/goodunit', sort: 708 },
|
||||
{ url: 'other/supplierBrand', label: '品牌管理', icon: 'Star', path: '/other/brand', sort: 709 },
|
||||
@ -128,10 +120,8 @@ export const MENU_LABELS: MenuLabel[] = [
|
||||
// ===== 基础设施(message/job/oss) =====
|
||||
{ url: 'message/sms', label: '短信配置', icon: 'ChatDotRound', path: '/message/sms', sort: 800 },
|
||||
{ url: 'job/schedule', label: '定时任务', icon: 'Timer', path: '/job/schedule', sort: 801 },
|
||||
{ url: 'oss/oss', label: '文件上传', icon: 'FolderOpened', path: '/oss', sort: 802 },
|
||||
|
||||
// ===== 开发工具(devtools) =====
|
||||
{ url: 'devtools/generator', label: '代码模板', icon: 'MagicStick', path: '/devtools/generator', sort: 900 },
|
||||
{ url: 'devtools/datasource', label: '数据源配置', icon: 'Coin', path: '/devtools/datasource', sort: 901 },
|
||||
{ url: 'devtools/param', label: '参数配置', icon: 'SetUp', path: '/devtools/param', sort: 902 },
|
||||
{ url: 'devtools/baseclass', label: '基类配置', icon: 'Files', path: '/devtools/baseclass', sort: 903 },
|
||||
@ -144,37 +134,13 @@ export const MENU_LABELS: MenuLabel[] = [
|
||||
{ url: 'openapi/company-account', label: '公司账号管理', icon: 'Avatar', path: '/openapi/company', sort: 1002 },
|
||||
|
||||
// ===== 补充缺失的菜单项(super_admin=1 时可见) =====
|
||||
{ url: 'other/categoryZH', label: '综合分类', icon: 'Menu', path: '/other/category/zh', sort: 708 },
|
||||
{ url: 'other/categoryCZ', label: '城镇分类', icon: 'Menu', path: '/other/category/cz', sort: 709 },
|
||||
{ url: 'sys/dict-type', label: '字典类型', icon: 'Collection', path: '/sys/dict', sort: 412 },
|
||||
{ url: 'sys/notice', label: '通知公告', icon: 'Bell', path: '/sys/notice', sort: 413 },
|
||||
{ url: 'sys/params', label: '参数配置', icon: 'Setting', path: '/sys/params', sort: 414 },
|
||||
{ url: 'pay/order', label: '支付订单', icon: 'Money', path: '/pay/order', sort: 810 },
|
||||
{ url: 'pay/alipaynotifylog', label: '支付宝通知日志', icon: 'Document', path: '/pay/alipay', sort: 811 },
|
||||
{ url: 'sys/news', label: '资讯管理', icon: 'Document', path: '/sys/news', sort: 415 },
|
||||
{ url: 'sys/ureport', label: '报表设计', icon: 'DataAnalysis', path: '/sys/ureport', sort: 416 },
|
||||
{ url: 'sys/excel', label: 'Excel导出', icon: 'Download', path: '/sys/excel', sort: 417 },
|
||||
{ url: 'sys/charts', label: '图表示例', icon: 'TrendCharts', path: '/sys/charts', sort: 418 },
|
||||
{ url: 'sys/product', label: '商品示例', icon: 'Box', path: '/sys/product', sort: 419 },
|
||||
{ url: 'product/shop', label: '店铺管理(→商品管理)', icon: 'Shop', path: '/supplier/good', sort: 350 },
|
||||
{ url: 'orderMake/index-admin', label: '开单(管理端)', icon: 'Edit', path: '/order/create-admin', sort: 6 },
|
||||
{ url: 'villageManage/farmerList', label: '农户列表', icon: 'User', path: '/village/farmer', sort: 7 },
|
||||
{ url: 'villageManage/resourceList', label: '资源列表', icon: 'List', path: '/village/resource', sort: 8 },
|
||||
{ url: 'supplyList/index', label: '供应商列表', icon: 'Shop', path: '/supply', sort: 9 },
|
||||
{ url: 'api/user', label: 'API用户', icon: 'User', path: '/api/user', sort: 603 },
|
||||
{ url: 'api/label', label: 'API标签', icon: 'PriceTag', path: '/api/label', sort: 604 },
|
||||
{ url: 'api/teacher', label: '教师管理', icon: 'User', path: '/api/teacher', sort: 605 },
|
||||
{ url: 'api/question', label: '题库管理', icon: 'Document', path: '/api/question', sort: 606 },
|
||||
{ url: 'api/answerrecord', label: '答题记录', icon: 'List', path: '/api/answer', sort: 607 },
|
||||
{ url: 'api/broker', label: '经纪人', icon: 'User', path: '/api/broker', sort: 608 },
|
||||
{ url: 'api/broker-securities', label: '证券经纪人', icon: 'User', path: '/api/broker-securities', sort: 609 },
|
||||
{ url: 'api/withdrawal', label: '提现管理', icon: 'Money', path: '/api/withdrawal', sort: 610 },
|
||||
{ url: 'api/balancedetail', label: '余额明细', icon: 'Wallet', path: '/api/balance', sort: 611 },
|
||||
{ url: 'message/mail-template', label: '邮件模板', icon: 'Document', path: '/message/mail-template', sort: 803 },
|
||||
{ url: 'message/mail-log', label: '邮件日志', icon: 'List', path: '/message/mail-log', sort: 804 },
|
||||
{ url: 'message/sms-log', label: '短信日志', icon: 'List', path: '/message/sms-log', sort: 805 },
|
||||
{ url: 'sys/notice-user', label: '用户通知', icon: 'Bell', path: '/sys/notice-user', sort: 420 },
|
||||
{ url: 'message/messageinitiavtive', label: '主动消息', icon: 'ChatDotRound', path: '/message/initiative', sort: 806 }
|
||||
]
|
||||
|
||||
/** fallback:未匹配到的菜单项用 url 当 label */
|
||||
|
||||
198
src/modules/generic/GenericTableView.vue
Normal file
198
src/modules/generic/GenericTableView.vue
Normal file
@ -0,0 +1,198 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* F006 通用表格页面 (W5.x.x+3)
|
||||
* 沿用老 vue 后台菜单, 后端 500 时退化为占位提示
|
||||
*/
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { httpGet } from '@/utils/request'
|
||||
import DataTable from '@/components/DataTable/DataTable.vue'
|
||||
|
||||
interface Column {
|
||||
prop?: string
|
||||
label: string
|
||||
width?: number | string
|
||||
minWidth?: number | string
|
||||
type?: 'status' | 'text' | 'date' | 'image' | 'html'
|
||||
statusMap?: Record<string, { label: string; type: string }>
|
||||
slot?: string
|
||||
formatter?: (row: any) => string
|
||||
align?: string
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
const props = defineProps<{
|
||||
title?: string
|
||||
endpoint?: string
|
||||
columns?: Column[]
|
||||
queryParams?: Record<string, any>
|
||||
pageSize?: number
|
||||
filterKey?: string
|
||||
emptyText?: string
|
||||
hint?: string
|
||||
}>()
|
||||
|
||||
const title = computed(() => props.title || (route.meta?.title as string) || '列表')
|
||||
const columns = computed<Column[]>(() => props.columns || [])
|
||||
const emptyText = computed(() => props.emptyText || '暂无数据')
|
||||
|
||||
const list = ref<any[]>([])
|
||||
const total = ref(0)
|
||||
const loading = ref(false)
|
||||
const error = ref<string | null>(null)
|
||||
const page = ref(1)
|
||||
const limit = ref(props.pageSize || 20)
|
||||
const filterKw = ref('')
|
||||
const status = ref<'checking' | '200' | '500' | '404' | 'error'>('checking')
|
||||
const statusMsg = ref('')
|
||||
|
||||
async function load() {
|
||||
if (!props.endpoint) {
|
||||
status.value = '404'
|
||||
statusMsg.value = '未配置 endpoint'
|
||||
return
|
||||
}
|
||||
loading.value = true
|
||||
error.value = null
|
||||
status.value = 'checking'
|
||||
try {
|
||||
const params: any = { page: page.value, limit: limit.value, ...(props.queryParams || {}) }
|
||||
const data: any = await httpGet<{ total: number; list: any[] }>(props.endpoint, params)
|
||||
list.value = data?.list || []
|
||||
total.value = Number(data?.total || 0)
|
||||
status.value = '200'
|
||||
} catch (e: any) {
|
||||
const code = e?.code || e?.status
|
||||
const msg = e?.msg || e?.message || '加载失败'
|
||||
list.value = []
|
||||
total.value = 0
|
||||
if (code === 404) {
|
||||
status.value = '404'
|
||||
statusMsg.value = '后端 API 未实现'
|
||||
} else if (code === 500) {
|
||||
status.value = '500'
|
||||
statusMsg.value = msg
|
||||
} else {
|
||||
status.value = 'error'
|
||||
statusMsg.value = msg
|
||||
}
|
||||
error.value = msg
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const filtered = computed(() => {
|
||||
if (!props.filterKey) return list.value
|
||||
const kw = filterKw.value.trim().toLowerCase()
|
||||
if (!kw) return list.value
|
||||
return list.value.filter((it) => String(it[props.filterKey!] || '').toLowerCase().includes(kw))
|
||||
})
|
||||
|
||||
function onSearch() { page.value = 1; load() }
|
||||
function onReset() { filterKw.value = ''; page.value = 1; load() }
|
||||
function onPageChange(p: number) { page.value = p; load() }
|
||||
function onLimitChange(l: number) { limit.value = l; page.value = 1; load() }
|
||||
|
||||
function formatDate(s: string): string {
|
||||
if (!s) return '--'
|
||||
return String(s).substring(0, 19).replace('T', ' ')
|
||||
}
|
||||
|
||||
function cellText(row: any, col: Column): string {
|
||||
const v = row[col.prop!]
|
||||
if (v === null || v === undefined || v === '') return '--'
|
||||
if (col.formatter) return col.formatter(row)
|
||||
return String(v)
|
||||
}
|
||||
|
||||
onMounted(load)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="rr-page">
|
||||
<div class="rr-page-header">
|
||||
<h2 class="rr-page-title">{{ title }}</h2>
|
||||
<p class="rr-page-sub" v-if="status === '200'">共 {{ total }} 条, 当前页 {{ filtered.length }} 条</p>
|
||||
<p class="rr-page-sub" v-else-if="status === 'checking'">加载中...</p>
|
||||
</div>
|
||||
|
||||
<el-alert v-if="props.hint" type="info" :closable="false" style="margin-bottom: 16px;">{{ props.hint }}</el-alert>
|
||||
|
||||
<template v-if="status === '200'">
|
||||
<div class="rr-filters" v-if="props.filterKey">
|
||||
<el-input v-model="filterKw" :placeholder="`按 ${props.filterKey} 筛选`" clearable class="rr-filter-input" size="default" @keyup.enter="onSearch" />
|
||||
<el-button class="rr-btn-secondary" size="default" @click="onSearch">查询</el-button>
|
||||
<el-button class="rr-btn-secondary" size="default" @click="onReset">重置</el-button>
|
||||
</div>
|
||||
|
||||
<div class="rr-card">
|
||||
<el-table :data="filtered" border style="width: 100%" v-loading="loading">
|
||||
<el-table-column
|
||||
v-for="col in columns"
|
||||
:key="col.prop || col.label"
|
||||
:prop="col.prop"
|
||||
:label="col.label"
|
||||
:width="col.width"
|
||||
:min-width="col.minWidth"
|
||||
:align="col.align || 'left'"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="slotProps">
|
||||
<el-tag v-if="col.type === 'status' && col.statusMap" :type="(col.statusMap[String(slotProps.row[col.prop!])]?.type as any) || 'info'" size="small" effect="light">
|
||||
{{ col.statusMap[String(slotProps.row[col.prop!])]?.label || slotProps.row[col.prop!] }}
|
||||
</el-tag>
|
||||
<span v-else-if="col.type === 'date'">{{ formatDate(slotProps.row[col.prop!]) }}</span>
|
||||
<el-image v-else-if="col.type === 'image' && slotProps.row[col.prop!]" :src="slotProps.row[col.prop!]" style="width: 40px; height: 40px; border-radius: 4px" fit="cover" />
|
||||
<span v-else-if="col.type === 'image'" class="rr-no-img">无图</span>
|
||||
<span v-else>{{ cellText(slotProps.row, col) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<el-empty :description="emptyText" />
|
||||
</template>
|
||||
</el-table>
|
||||
<div class="rr-pagination" v-if="total > 0">
|
||||
<el-pagination
|
||||
:current-page="page"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="limit"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="onLimitChange"
|
||||
@current-change="onPageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-else-if="status !== 'checking'">
|
||||
<div class="rr-card rr-result-card">
|
||||
<el-result
|
||||
:icon="status === '500' ? 'warning' : 'info'"
|
||||
:title="status === '500' ? '后端服务异常' : '后端 API 未实现'"
|
||||
:sub-title="statusMsg || '该菜单在老 vue 后台存在, 但当前后端未实装 (老数据库表缺失 / admin-server 权限不足)'"
|
||||
>
|
||||
<template #extra>
|
||||
<el-tag v-if="props.endpoint" type="info" size="small">端点: {{ props.endpoint }}</el-tag>
|
||||
</template>
|
||||
</el-result>
|
||||
<p class="rr-placeholder-hint">说明: 沿用老 vue 后台的菜单和功能, 但当前数据库无对应表, 暂以占位页展示。如需启用, 需后端补建表结构。</p>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.rr-page { max-width: 1400px; }
|
||||
.rr-page-header { margin-bottom: 16px; }
|
||||
.rr-page-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 4px; }
|
||||
.rr-page-sub { color: var(--ink-3); font-size: 13px; }
|
||||
.rr-filters { margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }
|
||||
.rr-filter-input { width: 280px; }
|
||||
.rr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; padding: 0; }
|
||||
.rr-result-card { padding: 24px; }
|
||||
.rr-no-img { color: var(--ink-3); font-size: 12px; }
|
||||
.rr-placeholder-hint { color: var(--ink-3); font-size: 12.5px; text-align: center; margin: 0 0 16px 0; }
|
||||
</style>
|
||||
.rr-pagination { margin-top: 16px; display: flex; justify-content: flex-end; }
|
||||
@ -310,6 +310,105 @@ const routes: RouteRecordRaw[] = [
|
||||
redirect: '/other/operateguide'
|
||||
},
|
||||
|
||||
// W5.x.x+3: 11 个 P3 菜单改用 GenericTableView (沿用老 vue 后台菜单, 后端 500 时退化占位)
|
||||
// 4 个 message 端点 (admin-server, 走 /sys/{sms,smslog,mailtemplate,maillog}/page)
|
||||
{ path: '/message/sms', name: 'MessageSms', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '短信配置', endpoint: '/sys/sms/page', filterKey: 'smsCode',
|
||||
columns: [
|
||||
{ prop: 'smsCode', label: '短信编码', minWidth: 200 },
|
||||
{ prop: 'platform', label: '平台', width: 120, type: 'status',
|
||||
statusMap: { 1: {label:'阿里云',type:'primary'}, 2: {label:'腾讯云',type:'success'}, 3: {label:'其他',type:'info'} } },
|
||||
{ prop: 'remark', label: '备注', minWidth: 200 },
|
||||
{ prop: 'createDate', label: '创建时间', width: 180, type: 'date' }
|
||||
] }), meta: { title: '短信配置' } },
|
||||
{ path: '/message/sms-log', name: 'MessageSmsLog', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '短信日志', endpoint: '/sys/smslog/page', filterKey: 'mobile',
|
||||
columns: [
|
||||
{ prop: 'mobile', label: '手机号', width: 160 },
|
||||
{ prop: 'smsCode', label: '短信编码', width: 200 },
|
||||
{ prop: 'platform', label: '平台', width: 100, type: 'status',
|
||||
statusMap: { 1: {label:'阿里云',type:'primary'}, 2: {label:'腾讯云',type:'success'} } },
|
||||
{ prop: 'status', label: '状态', width: 100, type: 'status',
|
||||
statusMap: { 0: {label:'失败',type:'danger'}, 1: {label:'成功',type:'success'} } },
|
||||
{ prop: 'createDate', label: '发送时间', width: 180, type: 'date' }
|
||||
] }), meta: { title: '短信日志' } },
|
||||
{ path: '/message/mail-template', name: 'MessageMailTemplate', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '邮件模板', endpoint: '/sys/mailtemplate/page', filterKey: 'name',
|
||||
columns: [
|
||||
{ prop: 'name', label: '模板名称', minWidth: 200 },
|
||||
{ prop: 'subject', label: '邮件主题', minWidth: 200 },
|
||||
{ prop: 'createDate', label: '创建时间', width: 180, type: 'date' }
|
||||
] }), meta: { title: '邮件模板' } },
|
||||
{ path: '/message/mail-log', name: 'MessageMailLog', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '邮件日志', endpoint: '/sys/maillog/page', filterKey: 'mailTo',
|
||||
columns: [
|
||||
{ prop: 'mailTo', label: '收件人', minWidth: 200 },
|
||||
{ prop: 'subject', label: '主题', minWidth: 200 },
|
||||
{ prop: 'status', label: '状态', width: 100, type: 'status',
|
||||
statusMap: { 0: {label:'失败',type:'danger'}, 1: {label:'成功',type:'success'} } },
|
||||
{ prop: 'createDate', label: '发送时间', width: 180, type: 'date' }
|
||||
] }), meta: { title: '邮件日志' } },
|
||||
// 4 个运营中心 (共用 GenericTableView, type 参数 1=全国 2=省级 3=县级 4=行业协会)
|
||||
{ path: '/sys/operation', name: 'SysOperationCountry', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '全国运营中心', endpoint: '/sys/operation/pageList', queryParams: { type: 1 }, filterKey: 'name',
|
||||
columns: [
|
||||
{ prop: 'name', label: '运营中心名称', minWidth: 200 },
|
||||
{ prop: 'type', label: '类型', width: 100, type: 'status',
|
||||
statusMap: { 1: {label:'全国',type:'primary'}, 2: {label:'省级',type:'success'}, 3: {label:'县级',type:'info'}, 4: {label:'行业协会',type:'warning'} } },
|
||||
{ prop: 'realName', label: '负责人', width: 140 },
|
||||
{ prop: 'createDate', label: '创建时间', width: 180, type: 'date' }
|
||||
] }), meta: { title: '全国运营中心' } },
|
||||
{ path: '/sys/operation/province', name: 'SysOperationProvince', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '省级运营中心', endpoint: '/sys/operation/pageList', queryParams: { type: 2 }, filterKey: 'name',
|
||||
columns: [
|
||||
{ prop: 'name', label: '运营中心名称', minWidth: 200 },
|
||||
{ prop: 'provinceName', label: '省份', width: 160 },
|
||||
{ prop: 'realName', label: '负责人', width: 140 },
|
||||
{ prop: 'createDate', label: '创建时间', width: 180, type: 'date' }
|
||||
] }), meta: { title: '省级运营中心' } },
|
||||
{ path: '/sys/operation/county', name: 'SysOperationCounty', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '县级运营中心', endpoint: '/sys/operation/pageList', queryParams: { type: 3 }, filterKey: 'name',
|
||||
columns: [
|
||||
{ prop: 'name', label: '运营中心名称', minWidth: 200 },
|
||||
{ prop: 'provinceName', label: '省份', width: 160 },
|
||||
{ prop: 'cityName', label: '城市', width: 160 },
|
||||
{ prop: 'areaName', label: '区县', width: 160 },
|
||||
{ prop: 'realName', label: '负责人', width: 140 },
|
||||
{ prop: 'createDate', label: '创建时间', width: 180, type: 'date' }
|
||||
] }), meta: { title: '县级运营中心' } },
|
||||
{ path: '/sys/operation/association', name: 'SysOperationAssociation', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '行业协会运营中心', endpoint: '/sys/operation/pageList', queryParams: { type: 4 }, filterKey: 'name',
|
||||
columns: [
|
||||
{ prop: 'name', label: '运营中心名称', minWidth: 200 },
|
||||
{ prop: 'memberNo', label: '会员编号', width: 160 },
|
||||
{ prop: 'realName', label: '负责人', width: 140 },
|
||||
{ prop: 'createDate', label: '创建时间', width: 180, type: 'date' }
|
||||
] }), meta: { title: '行业协会运营中心' } },
|
||||
// 3 个资讯类 (other-server, 走 /other/information/page + /other/category/categoryDeepPageList)
|
||||
{ path: '/other/information', name: 'OtherInformation', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '资讯列表', endpoint: '/other/information/page', filterKey: 'title',
|
||||
columns: [
|
||||
{ prop: 'title', label: '资讯标题', minWidth: 320 },
|
||||
{ prop: 'categoryName', label: '分类', width: 140 },
|
||||
{ prop: 'viewSum', label: '阅读量', width: 100, align: 'right' },
|
||||
{ prop: 'createTime', label: '创建时间', width: 180, type: 'date' }
|
||||
] }), meta: { title: '资讯列表' } },
|
||||
{ path: '/other/industry', name: 'OtherIndustry', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '行业分类', endpoint: '/other/category/categoryDeepPageList', queryParams: { type: 1 }, filterKey: 'name',
|
||||
columns: [
|
||||
{ prop: 'name', label: '行业名称', minWidth: 200 },
|
||||
{ prop: 'id', label: 'ID', width: 100, align: 'right' },
|
||||
{ prop: 'sort', label: '排序', width: 100, align: 'right' }
|
||||
], hint: '行业分类(level=1), 后端 /other/category/categoryDeepPageList?type=1' }), meta: { title: '行业' } },
|
||||
{ path: '/other/category/zx', name: 'OtherCategoryZX', component: () => import('@/modules/generic/GenericTableView.vue'),
|
||||
props: () => ({ title: '资讯分类', endpoint: '/other/category/categoryDeepPageList', queryParams: { type: 1, level: 1 }, filterKey: 'name',
|
||||
columns: [
|
||||
{ prop: 'name', label: '分类名称', minWidth: 200 },
|
||||
{ prop: 'id', label: 'ID', width: 100, align: 'right' },
|
||||
{ prop: 'sort', label: '排序', width: 100, align: 'right' }
|
||||
], hint: '资讯分类(level=1), 后端 /other/category/categoryDeepPageList?type=1&level=1' }), meta: { title: '资讯分类' } },
|
||||
|
||||
// W3.1 通用通配占位 — 覆盖菜单 70 个 url
|
||||
// W3.1 通用通配占位 — 覆盖菜单 70 个 url(两层路径,如 /admin/user/finance/recharge)
|
||||
// 注意:必须放在具体路由后面,否则会拦截 /inquiry /login
|
||||
// 使用 ?:action 让 action 可选(单层路径如 /sys/user 也匹配),不加 (.*)* 避免贪婪匹配抢静态路由
|
||||
|
||||
Loading…
Reference in New Issue
Block a user