1.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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 to="/about/benwangzhaopin/list-1.html" v-if="routeLevel == 1">
  11. 本网招聘
  12. </el-breadcrumb-item>
  13. <el-breadcrumb-item>
  14. {{ newsDetail.con_title }}
  15. </el-breadcrumb-item>
  16. </el-breadcrumb>
  17. </div>
  18. </div>
  19. <!-- 资讯列表 -->
  20. <div class="newsDetail">
  21. <div class="inner">
  22. <div class="innerDetail">
  23. <div class="headImg"></div>
  24. <div class="innerDetail1">
  25. <mainStyle :skinId="skinId" :newsDetail="newsDetail" />
  26. </div>
  27. <div class="footImg"></div>
  28. </div>
  29. <div v-if="templateData[1].component_style.toString()=='1'">
  30. <menu1Style :skinId="skinId" :bottomMenu="bottomMenu" :pageId="pageId" />
  31. </div>
  32. <div v-if="templateData[1].component_style.toString()=='2'">
  33. <menu2Style :skinId="skinId" :bottomMenu="bottomMenu" :pageId="pageId" />
  34. </div>
  35. <div style="clear: both;"></div>
  36. </div>
  37. </div>
  38. </template>
  39. <script setup lang="ts">
  40. //0.页面依赖 start ---------------------------------------->
  41. import { ElBreadcrumb, ElBreadcrumbItem } from 'element-plus'
  42. import { ArrowRight } from '@element-plus/icons-vue'
  43. import type { INewsDetail, IBottomMenu } from '@/utils/dataInterface'
  44. //菜单
  45. import menu1Style from '@/components/template/component/menu/144x365/1.vue'
  46. import menu2Style from '@/components/template/component/menu/144x365/2.vue'
  47. //详情
  48. import mainStyle from '@/components/template/component/main/1200x1120/1.vue'
  49. interface Props {
  50. templateData:any,
  51. skinId: number,
  52. }
  53. const props = defineProps<Props>();
  54. //0.页面依赖 end ---------------------------------------->
  55. //1.页面数据 start ---------------------------------------->
  56. //必备参数
  57. const route = useRoute();
  58. const fullPath:string = route.path;
  59. const segments:string[] = fullPath.split('/');
  60. const targetSegment:string = segments[2];
  61. //判断路由深度
  62. const routeLevel = ref<number>(0);
  63. if(route.name == 'about-dir-dir-id'){
  64. routeLevel.value = 1;
  65. }
  66. let articleId:number;
  67. let pageId:number;
  68. //反向查询导航id
  69. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  70. method: 'GET',
  71. query: {
  72. 'foot_pinyin': targetSegment,
  73. },
  74. });
  75. if(getRouteId.code == 200){
  76. articleId = getRouteId.data.id;
  77. pageId = getRouteId.data.id;
  78. }
  79. //中央招聘详情
  80. const newsDetail = ref<INewsDetail>({
  81. con_title:"",
  82. content:"",
  83. type_id:0
  84. })
  85. async function getPageData() {
  86. const mkdata:any = await requestDataPromise('/web/getWebsiteFooterCategoryInfo', {
  87. method: 'GET',
  88. query: {
  89. 'fcat_id': articleId,
  90. 'type': '0'
  91. },
  92. });
  93. newsDetail.value = mkdata.data;
  94. }
  95. getPageData();
  96. //左侧悬浮菜单
  97. const bottomMenu = ref<IBottomMenu[]>([]);
  98. async function getPageMenu() {
  99. const mkdata:any = await requestDataPromise('/web/getWebsiteFooterCategory', {
  100. method: 'GET',
  101. query: {},
  102. });
  103. bottomMenu.value = mkdata.data;
  104. }
  105. getPageMenu();
  106. //1.页面数据 end---------------------------------------->
  107. </script>
  108. <style lang="less" scoped>
  109. //导航条
  110. .breadcrumb {
  111. width: 1200px;
  112. margin: 0 auto;
  113. height: 22px;
  114. padding-bottom: 30px;
  115. margin-top: 30px;
  116. margin-bottom: 30px;
  117. border-bottom: 1px solid #d9d9d9;
  118. font-family: Microsoft YaHei, Microsoft YaHei;
  119. font-weight: 400;
  120. font-size: 20px;
  121. color: #666666;
  122. line-height: 23px;
  123. text-align: left;
  124. font-style: normal;
  125. text-transform: none;
  126. .el-breadcrumb::v-deep {
  127. display: inline-block;
  128. vertical-align: -4px;
  129. }
  130. /deep/.el-breadcrumb__inner a,
  131. /deep/.el-breadcrumb__inner.is-link {
  132. color: #666666;
  133. font-weight: 400;
  134. text-decoration: none;
  135. transition: var(--el-transition-color);
  136. }
  137. span {
  138. font-family: Microsoft YaHei, Microsoft YaHei;
  139. font-weight: 400;
  140. font-size: 20px;
  141. color: #666666;
  142. line-height: 23px;
  143. text-align: left;
  144. font-style: normal;
  145. text-transform: none;
  146. }
  147. span:hover {
  148. color: #666666;
  149. }
  150. .location {
  151. margin-right: 20px;
  152. width: 100px;
  153. height: 22px;
  154. font-family: Microsoft YaHei, Microsoft YaHei;
  155. font-weight: 400;
  156. font-size: 20px;
  157. color: #666666;
  158. line-height: 23px;
  159. text-align: left;
  160. font-style: normal;
  161. text-transform: none;
  162. }
  163. }
  164. //列表容器
  165. .newsDetail {
  166. width: 100%;
  167. .inner {
  168. width: 1200px;
  169. font-size: 16px;
  170. position: relative;
  171. .innerDetail {
  172. margin: 0 auto;
  173. margin-bottom: 30px;
  174. min-height: 1370px;
  175. .innerDetail1 {
  176. min-height: 1370px;
  177. margin: 0 auto;
  178. box-sizing: border-box;
  179. }
  180. }
  181. }
  182. }
  183. </style>