index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <template>
  2. <div :style="{height: screenHeight,width: screenWidth}">
  3. <el-menu
  4. :style="{width: screenWidth}"
  5. mode="horizontal"
  6. :background-color="menuColor"
  7. text-color="#FFF"
  8. active-text-color="#FFF"
  9. @select="handleSelect"
  10. >
  11. <img class="logo" src="@/assets/home_images/homepage_logo@2x.png">
  12. <!-- <el-menu-item style="margin-left: 18.5%" index="4">项目管理</el-menu-item> -->
  13. <!-- <el-menu-item index="10">测试管理</el-menu-item> -->
  14. <!-- <el-menu-item index="1">环境管理</el-menu-item> -->
  15. <!-- <el-menu-item index="2">Mock服务</el-menu-item>
  16. <el-menu-item index="3">数据中心</el-menu-item>
  17. <el-menu-item index="6">虚拟硬件</el-menu-item>
  18. <el-menu-item index="7">上线质检</el-menu-item> -->
  19. <!-- <el-menu-item index="8">统计分析</el-menu-item> -->
  20. <!-- <el-menu-item index="9">工具集合</el-menu-item> -->
  21. <!-- <el-menu-item index="5" disabled>自动化</el-menu-item> -->
  22. <div class="div-login">
  23. <svg-icon icon-class="yonghu" />
  24. <el-dropdown style="color: #ffffff" @command="handleCommand">
  25. <span class="el-dropdown-link">
  26. {{ username }}
  27. <i class="el-icon-arrow-down el-icon--right" />
  28. </span>
  29. <el-dropdown-menu slot="dropdown">
  30. <el-dropdown-item command="a">退出</el-dropdown-item>
  31. </el-dropdown-menu>
  32. </el-dropdown>
  33. </div>
  34. </el-menu>
  35. <div style="color: #FFFF">
  36. <div class="div-introduction">
  37. <div>
  38. <img class="image-title" style="width: 470px" src="@/assets/home_images/banner_title@2x.png">
  39. <br>
  40. <span style="font-size: 17pt;">一站式质量效率平台,普惠你的工作</span><br>
  41. <el-button plain class="enter-button" @click.native="handleSelect('4')"><svg-icon icon-class="project-enter" />项目管理</el-button>
  42. <el-button plain class="enter-button" @click.native="handleSelect('1')"><svg-icon icon-class="env-enter" />环境管理</el-button>
  43. <el-button plain class="enter-button" @click.native="handleSelect('9')"><svg-icon icon-class="tool-enter" />工具集合</el-button>
  44. </div>
  45. <div class="home-carousel">
  46. <el-carousel :height="imgHeight + 'px'" indicator-position="outside">
  47. <el-carousel-item v-for="(item, index) in abc_img" :key="index">
  48. <img ref="image" :src="item.thumb" style="width: 100%; cursor: pointer;" @load="loadImage()" @click="image_carousel(item)">
  49. </el-carousel-item>
  50. </el-carousel>
  51. <img src="@/assets/home_images/home_inage.png" style="position: absolute; left: 45%; width: 60%;">
  52. </div>
  53. </div>
  54. <a href="#content1">
  55. <img
  56. class="img-arrow"
  57. style="width: 30px;"
  58. src="@/assets/home_images/banner_icon_arrow@3x.png"
  59. >
  60. </a>
  61. <img style="width: 100%;z-index: -1;" src="@/assets/home_images/home.jpg">
  62. </div>
  63. <div id="content1" />
  64. <div class="div-main" style="height: 600pt;width 100%;text-align: center;">
  65. <div style="font-size: 21pt;margin-top: 54pt;color: #333333;">功能介绍</div>
  66. <el-card disabled shadow="hover" style="margin-left: 0;margin-top: 42pt" @click.native="handleSelect('4')">
  67. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_流程管控@3x.png">
  68. <div class="div-title">项目管理</div>
  69. <div class="div-module-introduction">简单、明了、一站式流程管理</div>
  70. </el-card>
  71. <el-card shadow="hover" @click.native="handleSelect('10')">
  72. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_测试管理@3x.png" fit="contain">
  73. <div class="div-title">测试管理</div>
  74. <div class="div-module-introduction">全面综合的个性化环境服务</div>
  75. </el-card>
  76. <el-card shadow="hover" @click.native="handleSelect('1')">
  77. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_环境平台@3x.png" fit="contain">
  78. <div class="div-title">环境平台</div>
  79. <div class="div-module-introduction">全面综合的个性化环境服务</div>
  80. </el-card>
  81. <!-- <el-card shadow="hover" @click.native="handleSelect('2')">
  82. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_服务mock@3x.png">
  83. <div class="div-title">Mock服务</div>
  84. <div class="div-module-introduction">灵活稳定的Mock服务</div>
  85. </el-card>
  86. <br>
  87. <el-card shadow="hover" style="margin-left: 0;margin-top: 36pt;" @click.native="handleSelect('3')">
  88. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_数据中心@3x.png">
  89. <div class="div-title">数据中心</div>
  90. <div class="div-module-introduction">数据构造、统计、备份、分析</div>
  91. </el-card>
  92. <el-card shadow="hover" @click.native="handleSelect('6')">
  93. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_虚拟硬件@3x.png">
  94. <div class="div-title">虚拟硬件</div>
  95. <div class="div-module-introduction">设备一键生成,自由管控</div>
  96. </el-card>
  97. <el-card shadow="hover" @click.native="handleSelect('7')">
  98. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_上线质检@3x.png">
  99. <div class="div-title">上线质检</div>
  100. <div class="div-module-introduction">强管控上线过程,保障上线质量</div>
  101. </el-card> -->
  102. <br>
  103. <el-card shadow="hover" style="margin-left: 0;margin-top: 36pt" @click.native="handleSelect('8')">
  104. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_质量度量@3x.png">
  105. <div class="div-title">统计分析</div>
  106. <div class="div-module-introduction">通过各维度数据分析质量问题</div>
  107. </el-card>
  108. <el-card shadow="hover" @click.native="handleSelect('9')">
  109. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_工具合集@3x.png">
  110. <div class="div-title">工具集合</div>
  111. <div class="div-module-introduction">通过各维度数据分析质量问题</div>
  112. </el-card>
  113. <el-card shadow="never" @click.native="handleSelect('5')">
  114. <img class="image-module-logo" src="@/assets/home_images/功能介绍_icon_自动化未上线@3x.png">
  115. <div class="div-title" style="color: #999999">自动化-敬请期待</div>
  116. <div class="div-module-introduction">简洁优雅实现自动化</div>
  117. </el-card>
  118. <!-- <el-card class="expect" shadow="never">
  119. <div class="div-title" style="color: #999999" />
  120. <div class="div-module-introduction" />
  121. </el-card> -->
  122. </div>
  123. <div style="font-size: 12px; color: #FFF; height: 240px;width 100%;background-image: linear-gradient(to bottom right,#3e99fd,#1040db); text-align: center;">
  124. <div style="font-size: 20px; padding: 30px 0 10px; font-weight: 600;">质惠综合测试平台</div>
  125. <div style="padding: 0px 0 40px;">普惠质量技术部 效率工具FT</div>
  126. <div>流程管控-廖子君&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;Mock服务-赵福贵&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;环境平台-李嘉嘉/刘青&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;虚拟硬件-魏洁文&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;数据中心-王丽莎&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;自动化-陈雅琪/程如意</div>
  127. <div style="padding: 20px 0 40px;">产品设计-朱晓菲&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;UI设计-余霖&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;前端-秦志鹏/王子乾&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;FT负责人-叶宏钢/廖子君</div>
  128. <div style="font-size: 10px;">© 2019. All Rights Reserved</div>
  129. </div>
  130. <float-menu class="float-menu-home" />
  131. </div>
  132. </template>
  133. <style scoped>
  134. .home-carousel {
  135. width: 50%;
  136. border-top:30px solid #f5f5f5;
  137. border-right:30px solid #f5f5f5;
  138. border-left:30px solid #f5f5f5;
  139. border-radius: 12px;
  140. background: #f5f5f5;
  141. }
  142. .el-carousel__item:nth-child(2n) {
  143. background-color: #99a9bf;
  144. }
  145. .el-carousel__item:nth-child(2n+1) {
  146. background-color: #d3dce6;
  147. }
  148. .el-dropdown:hover {
  149. cursor: pointer;
  150. }
  151. .logo {
  152. position: absolute;
  153. width: 90px;
  154. left: 7.8%;
  155. top: 23%;
  156. }
  157. div.div-login {
  158. margin-top: 10px;
  159. color: #ffffff;
  160. display: inline-block;
  161. position: absolute;
  162. font-size: 10pt;
  163. top: 22%;
  164. right: 8.3%;
  165. }
  166. div.div-introduction {
  167. position: absolute;
  168. font-size: 37pt;
  169. top: 17.5%;
  170. left: 8.3%;
  171. line-height: 50px;
  172. width: 80%;
  173. display: flex;
  174. justify-content: space-between;
  175. }
  176. img.img-arrow {
  177. position: absolute;
  178. cursor: pointer;
  179. width: 2.1%;
  180. top: 95%;
  181. left: 48.95%;
  182. }
  183. .enter-button {
  184. margin-top: 6vh;
  185. margin-right: 20px;
  186. padding: 14px 10px;
  187. color: rgb(64,158,255);
  188. }
  189. .enter-button svg {
  190. margin-right: 10px;
  191. font-size: 18px;
  192. }
  193. .el-menu {
  194. border: none;
  195. height: 68px;
  196. position: fixed;
  197. z-index: 10;
  198. }
  199. .el-menu-item {
  200. padding-top: 1.5pt;
  201. height: 100%;
  202. }
  203. .is-active {
  204. color: #0fe3ff !important;
  205. border-color: #0fe3ff !important;
  206. }
  207. .el-menu-item:hover {
  208. color: #0fe3ff !important;
  209. background-color: transparent !important;
  210. }
  211. .float-menu-home {
  212. position: fixed;
  213. right: 10px;
  214. top: 70%;
  215. z-index: 10;
  216. }
  217. .el-card {
  218. display: inline-block;
  219. width: 22%;
  220. height: 180pt;
  221. margin-left: 56pt;
  222. text-align: center;
  223. border: none;
  224. }
  225. </style>
  226. <style scoped>
  227. .image-module-logo {
  228. margin-top: 25pt;
  229. width: 20%;
  230. height: 60px;
  231. object-fit: contain;
  232. }
  233. div.div-title {
  234. font-size: 13.5pt;
  235. color: #333333;
  236. margin-top: 21pt;
  237. }
  238. div.div-module-introduction {
  239. font-size: 10.5pt;
  240. color: #999999;
  241. margin-top: 7.5pt;
  242. }
  243. .el-card:hover {
  244. cursor: pointer;
  245. }
  246. .el-card.expect:hover {
  247. cursor: not-allowed;
  248. }
  249. </style>
  250. <style scoped>
  251. img.img-arrow {
  252. animation: arrow 1.5s infinite ease-in-out;
  253. -webkit-animation: arrow 1.5s infinite ease-in-out;
  254. }
  255. @keyframes arrow {
  256. 0% {
  257. opacity: 0;
  258. -webkit-transform: translate(0, 0px);
  259. }
  260. 50% {
  261. opacity: 1;
  262. -webkit-transform: translate(0, -5px);
  263. }
  264. 100% {
  265. opacity: 0;
  266. -webkit-transform: translate(0, -10px);
  267. }
  268. }
  269. @-webkit-keyframes arrow {
  270. 0% {
  271. opacity: 0;
  272. -webkit-transform: translate(0, 0px);
  273. }
  274. 50% {
  275. opacity: 1;
  276. -webkit-transform: translate(0, -5px);
  277. }
  278. 100% {
  279. opacity: 0;
  280. -webkit-transform: translate(0, -10px);
  281. }
  282. }
  283. </style>
  284. <script>
  285. import { mapGetters } from 'vuex'
  286. import FloatMenu from './floatMenu'
  287. import { logoutUrl, envUrl, toolsUrl } from '@/apiConfig/requestIP.js'
  288. import { settingUserGetBiz } from '@/api/projectIndex'
  289. import { materialGetMaterialList } from '@/api/monthly/index.js'
  290. export default {
  291. components: {
  292. FloatMenu
  293. },
  294. data() {
  295. return {
  296. abc_img: [],
  297. activeIndex2: '1',
  298. imgHeight: 300,
  299. menuColor: 'transparent',
  300. processManage: true,
  301. screenWidth: '100%',
  302. screenHeight: '1395pt'
  303. }
  304. },
  305. computed: {
  306. username() {
  307. return localStorage.getItem('realname')
  308. },
  309. ...mapGetters([
  310. 'bizId'
  311. ])
  312. },
  313. mounted() {
  314. this.materialGetMaterialList()
  315. window.addEventListener('resize', () => {
  316. this.imgHeight = this.$refs.image[0].height
  317. })
  318. window.addEventListener('scroll', this.handleScroll, true)
  319. window.onresize = () => {
  320. return (() => {
  321. if (document.body.clientWidth < 1300) {
  322. this.screenWidth = '1300px'
  323. } else {
  324. this.screenWidth = '100%'
  325. }
  326. })()
  327. }
  328. },
  329. created() {
  330. this.settingUserGetBiz()
  331. },
  332. methods: {
  333. loadImage() {
  334. this.imgHeight = this.$refs.image[0].height
  335. },
  336. image_carousel(e) {
  337. this.$router.push({ name: '月刊详情', query: { id: e.id }})
  338. },
  339. async materialGetMaterialList() {
  340. const res = await materialGetMaterialList({ pageSize: 5 })
  341. if (res.code === 200) {
  342. this.abc_img = res.data
  343. }
  344. },
  345. async settingUserGetBiz() { // 获取人员默认业务线
  346. const res = await settingUserGetBiz()
  347. if (res.code === 200 && res.data) {
  348. this.$store.dispatch('global/setBizId', res.data.bizId)
  349. localStorage.setItem('bizId', res.data.bizId)
  350. }
  351. },
  352. handleSelect(key, keyPath) {
  353. switch (key) {
  354. case '1':
  355. // this.$router.push({ name: 'env' })
  356. window.open(envUrl, '_self')
  357. break
  358. case '2':
  359. this.$router.push({ name: 'Interface' })
  360. break
  361. case '3':
  362. this.$router.push({ name: 'jar包管理' })
  363. break
  364. case '4' :
  365. if (!this.bizId || this.bizId === -1) {
  366. this.$router.push({ name: '业务线选择' })
  367. } else {
  368. this.$router.push({ name: '项目' })
  369. }
  370. break
  371. case '6':
  372. this.$router.push({ name: '单车' })
  373. break
  374. case '7':
  375. this.$router.push({ name: '上线质检' })
  376. break
  377. case '8':
  378. this.$router.push({ name: '统计分析' })
  379. break
  380. case '9':
  381. // this.$router.push({ name: 'Interface' })
  382. window.open(toolsUrl, '_self')
  383. break
  384. case '10':
  385. this.$router.push({ name: '测试用例' })
  386. break
  387. }
  388. },
  389. handleScroll() {
  390. const scrollTop =
  391. window.pageYOffset ||
  392. document.documentElement.scrollTop ||
  393. document.body.scrollTop
  394. if (scrollTop > 1) {
  395. this.menuColor = 'rgb(64,158,255)'
  396. } else {
  397. this.menuColor = 'transparent'
  398. }
  399. },
  400. handleCommand(command) {
  401. switch (command) {
  402. case 'a':
  403. location.href = logoutUrl
  404. break
  405. }
  406. }
  407. }
  408. }
  409. </script>