1.vue 5.6 KB

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