1.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <!-- 面包屑导航 -->
  3. <div class="breadcrumb">
  4. <div class="inner">
  5. <span class="location">当前位置:</span>
  6. <el-breadcrumb :separator-icon="ArrowRight">
  7. <el-breadcrumb-item>
  8. <NuxtLink to="/">首页</NuxtLink>
  9. </el-breadcrumb-item>
  10. <el-breadcrumb-item>本网招聘</el-breadcrumb-item>
  11. </el-breadcrumb>
  12. </div>
  13. </div>
  14. <div class="newsDetail">
  15. <div class="inner">
  16. <div class="innerDetail">
  17. <div class="innerDetail1">
  18. <div v-if="templateData[0].component_style.toString()=='1'">
  19. <list1Style :skinId="skinId" :newsList="newsList" />
  20. </div>
  21. <div v-if="templateData[0].component_style.toString()=='2'">
  22. <list2Style :skinId="skinId" :newsList="newsList" />
  23. </div>
  24. </div>
  25. </div>
  26. <div v-if="templateData[1].component_style.toString()=='1'">
  27. <menu1Style :skinId="skinId" :bottomMenu="bottomMenu" :pageId="pageId" />
  28. </div>
  29. <div v-if="templateData[1].component_style.toString()=='2'">
  30. <menu2Style :skinId="skinId" :bottomMenu="bottomMenu" :pageId="pageId" />
  31. </div>
  32. <div style="clear: both;"></div>
  33. </div>
  34. </div>
  35. </template>
  36. <script setup lang="ts">
  37. //0.页面依赖 start ---------------------------------------->
  38. import type { INewsDetail, IBottomMenu } from '@/utils/dataInterface'
  39. import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
  40. import { ArrowRight } from '@element-plus/icons-vue'
  41. //列表
  42. import list1Style from '@/components/template/component/list/1200x1220/1.vue'
  43. import list2Style from '@/components/template/component/list/1200x1220/2.vue'
  44. //菜单
  45. import menu1Style from '@/components/template/component/menu/144x365/1.vue'
  46. import menu2Style from '@/components/template/component/menu/144x365/2.vue'
  47. interface Props {
  48. templateData:any,
  49. skinId: number,
  50. }
  51. const props = defineProps<Props>();
  52. //0.页面依赖 end ---------------------------------------->
  53. //1.页面数据 start ---------------------------------------->
  54. //1.1 获得导航池id
  55. const route = useRoute();
  56. //获得当前的完整路径
  57. const fullPath = route.path;
  58. const segments = fullPath.split('/');
  59. const targetSegment = segments[2];
  60. let pageId:number;
  61. //通过导航路径反向查询导航id
  62. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  63. method: 'GET',
  64. query: {
  65. 'foot_pinyin': targetSegment,
  66. },
  67. });
  68. if(getRouteId.code == 200){
  69. pageId = getRouteId.data.id;
  70. }
  71. //1.2获得左侧导航
  72. const bottomMenu = ref([]);
  73. async function getPageMenu() {
  74. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
  75. method: 'GET',
  76. query: {},
  77. });
  78. bottomMenu.value = mkdata.data;
  79. }
  80. getPageMenu();
  81. //1.3获得数据列表
  82. const newsList = ref<IListData[]>([]);
  83. let newslists = async () => {
  84. const listData = await requestDataPromise('/web/getWebsiteFooterCategoryList', {
  85. method: 'GET',
  86. query: {
  87. 'fcat_id':pageId,
  88. },
  89. });
  90. newsList.value = listData.data;
  91. }
  92. newslists();
  93. //1.页面数据 end---------------------------------------->
  94. </script>
  95. <style lang="less" scoped>
  96. //导航条
  97. .breadcrumb {
  98. width: 1200px;
  99. margin: 0 auto;
  100. height: 22px;
  101. padding-bottom: 30px;
  102. margin-top: 30px;
  103. margin-bottom: 30px;
  104. border-bottom: 1px solid #d9d9d9;
  105. font-family: Microsoft YaHei, Microsoft YaHei;
  106. font-weight: 400;
  107. font-size: 20px;
  108. color: #666666;
  109. line-height: 23px;
  110. text-align: left;
  111. font-style: normal;
  112. text-transform: none;
  113. .el-breadcrumb::v-deep {
  114. display: inline-block;
  115. vertical-align: -4px;
  116. }
  117. /deep/.el-breadcrumb__inner a,
  118. /deep/.el-breadcrumb__inner.is-link {
  119. color: #666666;
  120. font-weight: 400;
  121. text-decoration: none;
  122. transition: var(--el-transition-color);
  123. }
  124. span {
  125. font-family: Microsoft YaHei, Microsoft YaHei;
  126. font-weight: 400;
  127. font-size: 20px;
  128. color: #666666;
  129. line-height: 23px;
  130. text-align: left;
  131. font-style: normal;
  132. text-transform: none;
  133. }
  134. span:hover {
  135. color: #666666;
  136. }
  137. .location {
  138. margin-right: 20px;
  139. width: 100px;
  140. height: 22px;
  141. font-family: Microsoft YaHei, Microsoft YaHei;
  142. font-weight: 400;
  143. font-size: 20px;
  144. color: #666666;
  145. line-height: 23px;
  146. text-align: left;
  147. font-style: normal;
  148. text-transform: none;
  149. }
  150. }
  151. //列表容器
  152. .newsDetail {
  153. width: 100%;
  154. .inner {
  155. width: 1200px;
  156. font-size: 16px;
  157. position: relative;
  158. .innerDetail {
  159. margin: 0 auto;
  160. margin-bottom: 30px;
  161. min-height: 1370px;
  162. .innerDetail1 {
  163. min-height: 1370px;
  164. margin: 0 auto;
  165. box-sizing: border-box;
  166. }
  167. }
  168. }
  169. }
  170. </style>