|
|
@@ -35,33 +35,7 @@
|
|
|
<div class="title">
|
|
|
<h2>数据统计</h2>
|
|
|
</div>
|
|
|
-
|
|
|
- <SimplePageContentLoader :loader="statsData">
|
|
|
- <div class="d-flex row">
|
|
|
- <div
|
|
|
- class="col-12 col-md-6 col-lg-4 col-xl-4"
|
|
|
- v-for="(stat,key) in statsData.content.value"
|
|
|
- :key="key"
|
|
|
- >
|
|
|
- <div :class="`main-card-box type${stat.type}`">
|
|
|
- <div class="content">
|
|
|
- <h4>{{ stat.title || '\u200b' }}</h4>
|
|
|
- <div class="descs">
|
|
|
- <a
|
|
|
- v-for="(data, key2) in stat.datas"
|
|
|
- class="box"
|
|
|
- :key="key2"
|
|
|
- :href="data.link"
|
|
|
- >
|
|
|
- <h5>{{ data.title }}</h5>
|
|
|
- <p>{{ data.value }}</p>
|
|
|
- </a>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </SimplePageContentLoader>
|
|
|
+ <IndexStats />
|
|
|
</div>
|
|
|
</section>
|
|
|
|
|
|
@@ -240,16 +214,9 @@ import SimplePageContentLoader from '@/components/content/SimplePageContentLoade
|
|
|
import IndexContent from '@/api/introduction/IndexContent';
|
|
|
import NewsIndexContent from '@/api/news/NewsIndexContent';
|
|
|
import UnmoveableContent from '@/api/inheritor/UnmoveableContent';
|
|
|
-import ProjectContent from '@/api/research/ProjectContent';
|
|
|
-import ActivityContent from '@/api/inheritor/ActivityContent';
|
|
|
-import ProductContent from '@/api/fusion/ProductContent';
|
|
|
-import ProductsContent from '@/api/inheritor/ProductsContent';
|
|
|
import ProjectsContent from '@/api/inheritor/ProjectsContent';
|
|
|
-import SeminarContent from '@/api/inheritor/SeminarContent';
|
|
|
import CommonContent, { GetColumListParams, GetContentListParams, type GetContentListItem } from '@/api/CommonContent';
|
|
|
|
|
|
-const router = useRouter();
|
|
|
-
|
|
|
const carouselConfig = {
|
|
|
itemsToShow: 1,
|
|
|
wrapAround: true,
|
|
|
@@ -288,97 +255,6 @@ const newsData = await useSSrSimpleDataLoader('news', async () => {
|
|
|
.setMainBodyColumnId([ 228/* , 298, 299 */ ])
|
|
|
, 1, 9)).list.map(p => p.toJSON());
|
|
|
});
|
|
|
-const statsData = await useSSrSimpleDataLoader('stats', async () => {
|
|
|
- const data = (await IndexContent.getStats());
|
|
|
- const semiCount = (await SeminarContent.getContentList(new GetContentListParams(), 1, 1)).total;
|
|
|
- const unmoveableCount = (await UnmoveableContent.getContentList(new GetContentListParams(), 1, 1)).total;
|
|
|
-
|
|
|
- return [
|
|
|
- {
|
|
|
- title: '非遗代表性项目',
|
|
|
- type: '1',
|
|
|
- datas: data.ichData.filter((p: any) => [ '人类非遗', '国家级', '省级', '市级' ].includes(p.level_text)).map((item: any) => {
|
|
|
- return {
|
|
|
- title: item.level_text,
|
|
|
- value: item.total,
|
|
|
- link: router.resolve({ path: '/inheritor/projects', query: { level: item.level } }).href,
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- {
|
|
|
- title: '非遗代表性传承人',
|
|
|
- type: '2',
|
|
|
- datas: data.inheritorData.filter((p: any) => [ '国家级', '省级', '市级'/* , '区县级' */ ].includes(p.title)).map((item: any) => {
|
|
|
- return {
|
|
|
- title: item.title,
|
|
|
- value: item.total,
|
|
|
- link: router.resolve({ path: '/inheritor/inheritor', query: { level: item.level } }).href
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- {
|
|
|
- title: '其他传承项目',
|
|
|
- type: '1',
|
|
|
- datas: [
|
|
|
- {
|
|
|
- title: '传习所',
|
|
|
- value: semiCount,
|
|
|
- link: router.resolve({ path: '/inheritor/seminar' }).href,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '传统村落',
|
|
|
- value: data.villageData[0]?.total ?? 0,
|
|
|
- link: router.resolve({ path: '/village/' }).href,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '文物古迹',
|
|
|
- value: unmoveableCount,
|
|
|
- link: router.resolve({ path: '/inheritor/unmoveable' }).href,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- /*{
|
|
|
- title: '不可移动文物',
|
|
|
- type: '3',
|
|
|
- datas: data.crData.map((item: any) => {
|
|
|
- return {
|
|
|
- title: item.title,
|
|
|
- value: item.total
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- {
|
|
|
- title: '闽南文化重要相关文物古迹',
|
|
|
- type: '2',
|
|
|
- datas: data.minnanCr.map((item: any) => {
|
|
|
- return {
|
|
|
- title: item.title,
|
|
|
- value: item.total
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- {
|
|
|
- title: '重要相关历史风貌区',
|
|
|
- type: '1',
|
|
|
- datas: data.historyData.map((item: any) => {
|
|
|
- return {
|
|
|
- title: item.title,
|
|
|
- value: item.total
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- {
|
|
|
- title: '传习中心',
|
|
|
- type: '3',
|
|
|
- datas: data.ichCenter.map((item: any) => {
|
|
|
- return {
|
|
|
- title: item.title,
|
|
|
- value: item.total
|
|
|
- }
|
|
|
- })
|
|
|
- },*/
|
|
|
- ];
|
|
|
-});
|
|
|
const recordData = await useSSrSimpleDataLoader('record', async () => {
|
|
|
return (await CommonContent.getContentList(new GetContentListParams()
|
|
|
.setSelfValues({
|