1.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. {{ routeName }}
  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. routeName.value = mkdata.data.con_title;
  95. getPageMenu();
  96. }
  97. getPageData();
  98. //左侧悬浮菜单
  99. const bottomMenu = ref<IBottomMenu[]>([]);
  100. const routeName = ref<string>("");
  101. async function getPageMenu() {
  102. const mkdata:any = await requestDataPromise('/web/getWebsiteFooterCategory', {
  103. method: 'GET',
  104. query: {},
  105. });
  106. bottomMenu.value = mkdata.data;
  107. for(let item of bottomMenu.value){
  108. if(item.name_pinyin == segments[2]){
  109. routeName.value = item.name;
  110. }
  111. }
  112. }
  113. //1.页面数据 end---------------------------------------->
  114. </script>
  115. <style lang="less" scoped>
  116. //导航条
  117. .breadcrumb {
  118. width: 1200px;
  119. margin: 0 auto;
  120. height: 22px;
  121. padding-bottom: 30px;
  122. margin-top: 30px;
  123. margin-bottom: 30px;
  124. border-bottom: 1px solid #d9d9d9;
  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. .el-breadcrumb::v-deep {
  134. display: inline-block;
  135. vertical-align: -4px;
  136. }
  137. :deep(.el-breadcrumb__inner a),
  138. :deep(.el-breadcrumb__inner.is-link) {
  139. color: #666666;
  140. font-weight: 400;
  141. text-decoration: none;
  142. transition: var(--el-transition-color);
  143. }
  144. span {
  145. font-family: Microsoft YaHei, Microsoft YaHei;
  146. font-weight: 400;
  147. font-size: 20px;
  148. color: #666666;
  149. line-height: 23px;
  150. text-align: left;
  151. font-style: normal;
  152. text-transform: none;
  153. }
  154. span:hover {
  155. color: #666666;
  156. }
  157. .location {
  158. margin-right: 20px;
  159. width: 100px;
  160. height: 22px;
  161. font-family: Microsoft YaHei, Microsoft YaHei;
  162. font-weight: 400;
  163. font-size: 20px;
  164. color: #666666;
  165. line-height: 23px;
  166. text-align: left;
  167. font-style: normal;
  168. text-transform: none;
  169. }
  170. }
  171. //列表容器
  172. .newsDetail {
  173. width: 100%;
  174. .inner {
  175. width: 1200px;
  176. font-size: 16px;
  177. position: relative;
  178. .innerDetail {
  179. margin: 0 auto;
  180. margin-bottom: 30px;
  181. //min-height: 1370px;
  182. .innerDetail1 {
  183. //min-height: 1370px;
  184. margin: 0 auto;
  185. box-sizing: border-box;
  186. }
  187. }
  188. }
  189. }
  190. </style>