|
@@ -1,10 +1,65 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="home" v-loading="loading">
|
|
|
|
|
- <swiper id="swiperBox" v-bind:options="swiperOption" ref="mySwiper">
|
|
|
|
|
|
|
+ <div class="home"
|
|
|
|
|
+ v-loading="loading">
|
|
|
|
|
+ <swiper id="swiperBox"
|
|
|
|
|
+ v-bind:options="swiperOption"
|
|
|
|
|
+ ref="mySwiper">
|
|
|
<swiper-slide class="swiper-slide slide-one"></swiper-slide>
|
|
<swiper-slide class="swiper-slide slide-one"></swiper-slide>
|
|
|
<swiper-slide class="swiper-slide slide-two"></swiper-slide>
|
|
<swiper-slide class="swiper-slide slide-two"></swiper-slide>
|
|
|
<swiper-slide class="swiper-slide slide-three"></swiper-slide>
|
|
<swiper-slide class="swiper-slide slide-three"></swiper-slide>
|
|
|
</swiper>
|
|
</swiper>
|
|
|
|
|
+ <div class="common-container">
|
|
|
|
|
+ <el-container>
|
|
|
|
|
+ <header>
|
|
|
|
|
+ <ul>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <img src=""
|
|
|
|
|
+ alt="">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p>1280</p>
|
|
|
|
|
+ <span>仪器总数</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <img src=""
|
|
|
|
|
+ alt="">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p>1280</p>
|
|
|
|
|
+ <span>仪器总数</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <img src=""
|
|
|
|
|
+ alt="">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p>1280</p>
|
|
|
|
|
+ <span>仪器总数</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ </header>
|
|
|
|
|
+ <div class="flex mt24">
|
|
|
|
|
+ <el-card class="flex-6">
|
|
|
|
|
+ <div slot="header" class="header">
|
|
|
|
|
+ <h4>通知公告</h4>
|
|
|
|
|
+ <el-button style="float: right; padding: 3px 0" type="text">查看更多</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ <el-card class="flex-4 ml24">
|
|
|
|
|
+ <div slot="header" class="header">
|
|
|
|
|
+ <h4>卡片名称</h4>
|
|
|
|
|
+ <el-button style="float: right; padding: 3px 0" type="text">cha</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-card class="mt24">
|
|
|
|
|
+ <div slot="header" class="header">
|
|
|
|
|
+ <h4>卡片名称</h4>
|
|
|
|
|
+ <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ </el-container>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -14,7 +69,7 @@ export default {
|
|
|
name: "HelloWorld",
|
|
name: "HelloWorld",
|
|
|
components: {
|
|
components: {
|
|
|
swiper,
|
|
swiper,
|
|
|
- swiperSlide
|
|
|
|
|
|
|
+ swiperSlide,
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -53,8 +108,8 @@ export default {
|
|
|
// this.list = this.list.concat(newList);
|
|
// this.list = this.list.concat(newList);
|
|
|
// }
|
|
// }
|
|
|
// }
|
|
// }
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {},
|
|
created() {},
|
|
@@ -62,13 +117,13 @@ export default {
|
|
|
computed: {
|
|
computed: {
|
|
|
swiper() {
|
|
swiper() {
|
|
|
return this.$refs.mySwiper.swiper;
|
|
return this.$refs.mySwiper.swiper;
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.$http
|
|
this.$http
|
|
|
.all([
|
|
.all([
|
|
|
this.$http.get("Cases/GetCasesAll"),
|
|
this.$http.get("Cases/GetCasesAll"),
|
|
|
- this.$http.get(`News?type=1&num=3`)
|
|
|
|
|
|
|
+ this.$http.get(`News?type=1&num=3`),
|
|
|
])
|
|
])
|
|
|
.then(
|
|
.then(
|
|
|
this.$http.spread((responseCases, responseNews) => {
|
|
this.$http.spread((responseCases, responseNews) => {
|
|
@@ -77,116 +132,11 @@ export default {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
})
|
|
})
|
|
|
);
|
|
);
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-/* .el-header {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
-} */
|
|
|
|
|
-.swiper-slide {
|
|
|
|
|
- font-size: 24px;
|
|
|
|
|
- // text-align: center;
|
|
|
|
|
- // line-height: 100px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
- align-content: center;
|
|
|
|
|
-
|
|
|
|
|
- .page {
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- h3,
|
|
|
|
|
- p {
|
|
|
|
|
- font-size: 40px;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .slogan {
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- font-size: 50px;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- padding: 30px 0;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-//经典案例
|
|
|
|
|
-.case-item {
|
|
|
|
|
- width: 1100px;
|
|
|
|
|
- height: 500px;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- margin-top: 30px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
- justify-content: flex-start;
|
|
|
|
|
- li {
|
|
|
|
|
- width: 330px;
|
|
|
|
|
- height: 250px;
|
|
|
|
|
- list-style: none;
|
|
|
|
|
- background-repeat: no-repeat;
|
|
|
|
|
- background-size: cover;
|
|
|
|
|
- background-position: center;
|
|
|
|
|
- background-origin: content-box;
|
|
|
|
|
- margin: 5px;
|
|
|
|
|
- position: relative;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
-
|
|
|
|
|
- &:hover {
|
|
|
|
|
- .case-item-hover {
|
|
|
|
|
- opacity: 1;
|
|
|
|
|
- transition: all 0.4s ease-in-out;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-//经典案例hover
|
|
|
|
|
-.case-item-hover {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- height: 100%;
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- top: 0;
|
|
|
|
|
- left: 0;
|
|
|
|
|
- opacity: 0;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- background-color: rgba(225, 56, 52, 0.7);
|
|
|
|
|
-
|
|
|
|
|
- .hover-title {
|
|
|
|
|
- height: 50px;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- font-size: 18px;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- margin-top: 20px;
|
|
|
|
|
- }
|
|
|
|
|
- .bottom {
|
|
|
|
|
- border-bottom: 1px solid #fff;
|
|
|
|
|
- width: 60px;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- }
|
|
|
|
|
- .more {
|
|
|
|
|
- width: 90px;
|
|
|
|
|
- padding: 5px 5px;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- margin-top: 100px;
|
|
|
|
|
- border: 2px solid #fff;
|
|
|
|
|
- span {
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- font-size: 20px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-// .swiper-slide:nth-child(2n) {
|
|
|
|
|
-// background: skyblue;
|
|
|
|
|
-// }
|
|
|
|
|
-// .swiper-slide:nth-child(2n-1) {
|
|
|
|
|
-// background: seashell;
|
|
|
|
|
-// }
|
|
|
|
|
.slide-one {
|
|
.slide-one {
|
|
|
height: 320px;
|
|
height: 320px;
|
|
|
background: url(../assets/img/home-banner.png) no-repeat center;
|
|
background: url(../assets/img/home-banner.png) no-repeat center;
|
|
@@ -202,80 +152,50 @@ export default {
|
|
|
background: url(../assets/img/home-banner.png) no-repeat center;
|
|
background: url(../assets/img/home-banner.png) no-repeat center;
|
|
|
background-size: cover;
|
|
background-size: cover;
|
|
|
}
|
|
}
|
|
|
-//最新资讯
|
|
|
|
|
-.news-content {
|
|
|
|
|
- width: 1240px;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- margin-top: 40px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: center;
|
|
|
|
|
-
|
|
|
|
|
- &-item {
|
|
|
|
|
- width: 400px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
|
|
+.common-container {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ .el-container {
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
-
|
|
|
|
|
- .item-img {
|
|
|
|
|
- width: 360px;
|
|
|
|
|
- height: 230px;
|
|
|
|
|
- background-repeat: no-repeat;
|
|
|
|
|
- background-size: cover;
|
|
|
|
|
- background-position: center;
|
|
|
|
|
- background-origin: content-box;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- }
|
|
|
|
|
- .el-divider {
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- height: 3px;
|
|
|
|
|
- .el-divider__text {
|
|
|
|
|
- width: 20px;
|
|
|
|
|
- height: 20px;
|
|
|
|
|
- border-radius: 50%;
|
|
|
|
|
- padding: 0px;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ header {
|
|
|
|
|
+ height: 100px;
|
|
|
|
|
+ width: 1200px;
|
|
|
|
|
+ margin-top: -50px;
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ box-shadow: 0px 3px 12px 1px rgba(1, 64, 100, 0.16);
|
|
|
|
|
+ border-radius: 16px;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ z-index: 999;
|
|
|
|
|
+ ul {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ height: 100px;
|
|
|
|
|
+ li {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ > div {
|
|
|
|
|
+ p {
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ font-size: 32px;
|
|
|
|
|
+ color: #323232;
|
|
|
|
|
+ }
|
|
|
|
|
+ span {
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: #323232;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- .item-content {
|
|
|
|
|
- width: 360px;
|
|
|
|
|
- height: 230px;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- //border: 1px solid paleturquoise;
|
|
|
|
|
- h3 {
|
|
|
|
|
- font-size: 22px;
|
|
|
|
|
- height: 30px;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
- }
|
|
|
|
|
- p {
|
|
|
|
|
- font-size: 15px;
|
|
|
|
|
- height: 80px;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- margin: 10px 0;
|
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
- display: -webkit-box;
|
|
|
|
|
- -webkit-line-clamp: 4;
|
|
|
|
|
- -webkit-box-orient: vertical;
|
|
|
|
|
- white-space: normal !important;
|
|
|
|
|
- word-wrap: break-word;
|
|
|
|
|
- }
|
|
|
|
|
- span {
|
|
|
|
|
- display: block;
|
|
|
|
|
- font-size: 14px;
|
|
|
|
|
- text-align: end;
|
|
|
|
|
- }
|
|
|
|
|
- h3,
|
|
|
|
|
- p,
|
|
|
|
|
- span {
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ .flex {
|
|
|
|
|
+ .flex-6 {
|
|
|
|
|
+ flex: 6;
|
|
|
|
|
+ }
|
|
|
|
|
+ .flex-4 {
|
|
|
|
|
+ flex: 4;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-.order {
|
|
|
|
|
- order: -1;
|
|
|
|
|
-}
|
|
|
|
|
-.order-img {
|
|
|
|
|
- order: 1;
|
|
|
|
|
-}
|
|
|
|
|
</style>
|
|
</style>
|