- 33 个 ListView.vue 加 :borderless=true + :page-sizes=[10,20,50,100]
覆盖: order/inquiry/finance/operateguide/sys/Dept|Menu|File|Notice|
Params|User|Role|Post|DictType|DictData|Product|Schedule|RoleGroup
user/Enterprise|enterpriselevel|enterprisescore|enterpriserating
supplier/promoter|couponscope|historylog|logistics|ordercomment|Activity
other/goodunit|label|textconfig
api/feedback|help|lunbo
openapi/AuditLog|CompanyAccount
- OrderListView: columns 抽到 script setup (computed) + :borderless +
:page-sizes + sub 动态显示选中数
- router/index.ts: /product/shop → redirect /supplier/good
(删 src/modules/product/shop/ShopListView.vue 旧占位, 后端 404 无意义)
- 沿用 W17 设计规范 v2 (PageHeader+SearchBar+DataTable+ListTabs)
63 lines
2.0 KiB
Vue
63 lines
2.0 KiB
Vue
<script setup lang="ts">
|
|
/**
|
|
* F006 操作指南 - W10 A7 标准化
|
|
*
|
|
* W10 A7: 套 PageHeader (无搜索, 简洁)
|
|
* 走 /other/operateguide/page
|
|
*/
|
|
import { onMounted, ref, reactive } from 'vue'
|
|
import { httpGet } from '@/utils/request'
|
|
import DataTable from '@/components/DataTable/DataTable.vue'
|
|
import PageHeader from '@/components/PageHeader/PageHeader.vue'
|
|
|
|
interface Guide {
|
|
id: string
|
|
title: string
|
|
content: string
|
|
viewSum: number | null
|
|
createTime: string
|
|
images: string | null
|
|
raw: any
|
|
}
|
|
|
|
const list = ref<Guide[]>([])
|
|
const total = ref(0)
|
|
const loading = ref(false)
|
|
const query = reactive({ page: 1, limit: 10 })
|
|
|
|
const columns = [
|
|
{ prop: 'id', label: 'ID', width: 80 },
|
|
{ prop: 'title', label: '标题', minWidth: 240 },
|
|
{ prop: 'viewSum', label: '浏览数', width: 100, formatter: (r: Guide) => String(r.viewSum ?? 0) },
|
|
{ prop: 'createTime', label: '创建时间', width: 180 }
|
|
]
|
|
|
|
async function load() {
|
|
loading.value = true
|
|
try {
|
|
const resp: any = await httpGet('/other/operateguide/page', { page: query.page, limit: query.limit })
|
|
list.value = resp?.list || []
|
|
total.value = Number(resp?.total || 0)
|
|
} catch { list.value = []; total.value = 0 } finally { loading.value = false }
|
|
}
|
|
function onPageChange(p: number) { query.page = p; load() }
|
|
function onLimitChange(l: number) { query.limit = l; query.page = 1; load() }
|
|
onMounted(load)
|
|
</script>
|
|
|
|
<template>
|
|
<div class="rr-page">
|
|
<PageHeader title="操作指南" :sub="`操作指南内容 (共 ${total} 条)`" />
|
|
<div class="rr-card">
|
|
<DataTable :columns="columns" :data="list"
|
|
:borderless="true" :loading="loading" :total="total" :page="query.page" :limit="query.limit" :show-pagination="true" row-key="id" empty-text="暂无内容" @page-change="onPageChange"
|
|
@limit-change="onLimitChange" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped lang="scss">
|
|
.rr-page { max-width: 1400px; }
|
|
.rr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
|
|
</style>
|