TabInherit.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <SimplePageListContentLoader class="d-flex flex-col flex-fill" :loader="loader">
  3. <Tab
  4. v-model="tab"
  5. :tabs="[
  6. { label: '文物' },
  7. { label: '非遗' },
  8. ]"
  9. autoSize
  10. itemWidth="100px"
  11. />
  12. <div v-if="tab === 0" class="content flex-fill gap-s">
  13. <div class="round-box introduction">
  14. <h1>闽南建筑文化简介</h1>
  15. <Vue3Marquee class="introduction-content" :duration="60" vertical>
  16. <p>闽南建筑风格独特。闽南建筑风格以红墙、红瓦、燕尾脊为特征,给人以鲜明、热烈的视觉感受。建筑中大量使用装饰性构件,如砖雕、石雕、木雕等,这些雕刻工艺精湛,图案丰富,具有很高的艺术价值。同时,建筑内部的布局和装饰也充满了闽南文化的特色,如“出砖入石”的墙体、精细的石雕和木雕、富有地方特色的彩绘等。</p>
  17. <p>闽南建筑融合了多元文化。闽南地区历史上是中原移民的重要聚居地,同时又与东南亚地区交往密切,因此闽南建筑文化中融合了中原文化、东南亚文化等多元文化因素。例如,闽南建筑的屋顶形式、装饰风格等受到中原文化的影响;而建筑中的雕刻艺术、建筑材料等则体现了东南亚文化的特色。这种多元文化的融合使得闽南建筑具有更加丰富的文化内涵</p>
  18. <p>通过了解这些闽南建筑文物的特点,人们能够更好地认识和了解闽南文化。同时,这些文物也是传承和弘扬闽南文化的重要载体。在今天的社会中,随着城市化进程的加速和传统文化的逐渐消失,保护和传承这些宝贵的文化遗产显得尤为重要。</p>
  19. </Vue3Marquee>
  20. <div class="d-flex flex-row chart-container">
  21. <v-chart class="chart" :option="chartOptionCity" autoresize />
  22. <v-chart class="chart" :option="chartOptionRegion" autoresize />
  23. </div>
  24. </div>
  25. <div class="d-flex flex-col map">
  26. <div class="round-box box main-any-button" :tabindex="1" />
  27. <GridList
  28. :list="loader.content.value?.list"
  29. item-style-type="round-box main-any-button"
  30. @itemClick="handleItemClick"
  31. />
  32. </div>
  33. </div>
  34. <div v-else-if="tab === 1" class="content flex-fill">
  35. <div></div>
  36. <div class="d-flex flex-col">
  37. <h1>非遗传承</h1>
  38. <p>以“闽南人”与“闽南建筑文化”为纽带构建三种精神:闽南精神、闽台精神、海丝精神体现闽南“魂”</p>
  39. <div class="intangible-list">
  40. <div
  41. v-for="(value, key) in intangibleList"
  42. :key="key"
  43. :style="{ background: `url(${value.image}) center center / cover` }"
  44. :tabindex="1"
  45. class="main-any-button"
  46. @click="handleIntangibleClick(value)"
  47. >
  48. {{ value.title }}
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </SimplePageListContentLoader>
  54. </template>
  55. <script setup lang="ts">
  56. import { ref } from 'vue';
  57. import { useSimpleDataLoader } from '@/composeable/SimpleDataLoader';
  58. import { useRouter } from 'vue-router';
  59. import CommonContent, { GetContentListParams } from '@/api/CommonContent';
  60. import SimplePageListContentLoader from '@/components/SimplePageListContentLoader.vue';
  61. import GridList from '@/components/small/GridList.vue';
  62. import VChart from 'vue-echarts';
  63. import Tab from '@/components/small/Tab.vue';
  64. import { ScrollRect } from '@imengyu/vue-scroll-rect';
  65. import { Vue3Marquee } from 'vue3-marquee';
  66. import { use } from 'echarts/core';
  67. import { CanvasRenderer } from 'echarts/renderers';
  68. import { PieChart } from 'echarts/charts';
  69. import { TitleComponent, TooltipComponent } from 'echarts/components';
  70. import IndexContent from '@/api/introduction/IndexContent';
  71. use([
  72. TitleComponent,
  73. CanvasRenderer,
  74. PieChart,
  75. TooltipComponent,
  76. ]);
  77. const emit = defineEmits(['itemClick']);
  78. const router = useRouter();
  79. const loader = useSimpleDataLoader(async () => {
  80. const stats = await IndexContent.getStats();
  81. stats.crData.forEach((i: any) => {
  82. const existsItem = chartOptionCity.value.series[0].data.find((p) => p.name === i.title);
  83. if (existsItem)
  84. existsItem.value = i.total;
  85. });
  86. stats.ichData.forEach((i: any) => {
  87. const existsItem = chartOptionRegion.value.series[0].data.find((p) => p.name === i.title);
  88. if (existsItem)
  89. existsItem.value = i.total;
  90. });
  91. return CommonContent.getContentList(new GetContentListParams().setModelId(1), 1, 12)
  92. });
  93. const tab = ref(0);
  94. const chartOptionCity = ref({
  95. tooltip: {
  96. trigger: 'item',
  97. formatter: '{a} <br/>{b} : {c} ({d}%)',
  98. },
  99. title: {
  100. text: '厦门市文物统计',
  101. left: 'center',
  102. },
  103. series: [
  104. {
  105. name: '厦门市文物统计',
  106. type: 'pie',
  107. radius: '55%',
  108. center: ['50%', '60%'],
  109. data: [
  110. { name: '湖里区', value: 126 },
  111. { name: '思明区', value: 178 },
  112. { name: '海沧区', value: 478 },
  113. { name: '鼓浪屿', value: 151 },
  114. { name: '集美区', value: 220 },
  115. { name: '同安区', value: 503 },
  116. { name: '翔安区', value: 365 },
  117. ],
  118. label: {
  119. show: true,
  120. formatter: '{b}: {c}'
  121. },
  122. emphasis: {
  123. itemStyle: {
  124. shadowBlur: 10,
  125. shadowOffsetX: 0,
  126. shadowColor: 'rgba(0, 0, 0, 0.5)',
  127. },
  128. },
  129. },
  130. ],
  131. });
  132. const chartOptionRegion = ref({
  133. tooltip: {
  134. trigger: 'item',
  135. formatter: '{a} <br/>{b} : {c} ({d}%)',
  136. },
  137. title: {
  138. text: '厦门市非遗统计',
  139. left: 'center',
  140. },
  141. series: [
  142. {
  143. name: '厦门市非遗统计',
  144. type: 'pie',
  145. radius: '55%',
  146. center: ['50%', '60%'],
  147. data: [
  148. { name: '国家级', value: 48 },
  149. { name: '省级', value: 57 },
  150. { name: '市级', value: 88 },
  151. { name: '县级', value: 35 },
  152. { name: '区级', value: 54 },
  153. ],
  154. label: {
  155. show: true,
  156. formatter: '{b}: {c}'
  157. },
  158. emphasis: {
  159. itemStyle: {
  160. shadowBlur: 10,
  161. shadowOffsetX: 0,
  162. shadowColor: 'rgba(0, 0, 0, 0.5)',
  163. },
  164. },
  165. },
  166. ],
  167. });
  168. const intangibleList = [
  169. {
  170. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/fy_1.png',
  171. title: '非遗项目',
  172. modelId: 2,
  173. },
  174. {
  175. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/fy_2.png',
  176. title: '传承人',
  177. modelId: 7,
  178. mainBodyColumnId: 38,
  179. },
  180. {
  181. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/fy_3.png',
  182. title: '非遗产品',
  183. modelId: 9,
  184. },
  185. {
  186. image: 'https://huli-app.wenlvti.net/app_static/minnanhun/image/fy_4.png',
  187. title: '非遗活动',
  188. modelId: 18,
  189. mainBodyColumnId: 290,
  190. }
  191. ];
  192. function handleIntangibleClick(item: any) {
  193. router.push({ name: 'IntangibleList', query: {
  194. modelId: item.modelId,
  195. mainBodyColumnId: item.mainBodyColumnId,
  196. } });
  197. }
  198. function handleItemClick(item: any) {
  199. router.push({ name: 'ArtifactDetail', query: { id: item.id } });
  200. }
  201. </script>
  202. <style scoped lang="scss">
  203. .content {
  204. width: 100%;
  205. height: 80%;
  206. display: flex;
  207. flex-direction: row;
  208. align-items: stretch;
  209. position: relative;
  210. > div {
  211. width: 50%;
  212. height: 100%;
  213. display: flex;
  214. flex-direction: column;
  215. }
  216. }
  217. .round-box {
  218. padding: 1vw;
  219. border-radius: 1vw;
  220. box-sizing: border-box;
  221. border: var(--color-primary) solid 3px;
  222. overflow: hidden;
  223. }
  224. .introduction {
  225. background: url(https://huli-app.wenlvti.net/app_static/minnanhun/image/jzjs_bg.jpg) no-repeat center;
  226. background-size: cover;
  227. color: var(--color-text-primary);
  228. font-size: 0.8rem;
  229. .introduction-content {
  230. width: 100%;
  231. height: 50%;
  232. }
  233. .chart-container {
  234. position: relative;
  235. width: 100%;
  236. height: 48%;
  237. margin-top: 2%;
  238. }
  239. .chart {
  240. width: 50%;
  241. height: 100%;
  242. }
  243. }
  244. .map {
  245. position: relative;
  246. .box {
  247. width: 100%;
  248. height: 26%;
  249. background: url('@/assets/images/Inherit/map.jpg') no-repeat center;
  250. background-size: cover;
  251. }
  252. :deep(.grid-container) {
  253. height: 72%;
  254. margin-top: 2%;
  255. grid-template-rows: repeat(3, 1fr);
  256. }
  257. :deep(.round-box) {
  258. padding: 1vw;
  259. border-radius: 1vw;
  260. box-sizing: border-box;
  261. border: var(--color-primary) solid 3px;
  262. overflow: hidden;
  263. }
  264. }
  265. .intangible-list {
  266. display: flex;
  267. flex-direction: row;
  268. justify-content: space-between;
  269. align-items: center;
  270. flex-wrap: wrap;
  271. gap: 20px;
  272. > div {
  273. width: 48%;
  274. aspect-ratio: 3 / 1;
  275. border-radius: 15px;
  276. display: flex;
  277. align-items: center;
  278. justify-content: center;
  279. padding-left: 20%;
  280. color: var(--color-text-primary);
  281. }
  282. }
  283. h1 {
  284. margin-top: 0.5rem;
  285. font-size: 1rem;
  286. color: var(--color-text-primary);
  287. }
  288. p {
  289. font-size: 0.8rem;
  290. color: var(--color-text);
  291. }
  292. </style>