Commit a33b0918 by zhuxiaomei

首页修改

parent 69a1b7ee
...@@ -64,9 +64,9 @@ ...@@ -64,9 +64,9 @@
</template> </template>
<script> <script>
import FooterBar from '@/components/FooterBar.vue' import FooterBar from '@/components/FooterBar.vue'
export default { export default {
name: "Home", name: "Home",
components: { components: {
FooterBar FooterBar
...@@ -74,16 +74,26 @@ ...@@ -74,16 +74,26 @@
data() { data() {
return {} return {}
}, },
mounted() {
const that = this
window.onresize = () => {
return (() => {
if (window.screen.width < 750) {
that.$router.replace('/home_old')
}
})()
}
},
methods: { methods: {
_goto(uri) { _goto(uri) {
this.$router.push(uri) this.$router.push(uri)
} }
} }
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.home-cont { .home-cont {
padding: 20px 30px; padding: 20px 30px;
color: #ffffff; color: #ffffff;
height: calc(100% - 50px); height: calc(100% - 50px);
...@@ -91,40 +101,40 @@ ...@@ -91,40 +101,40 @@
/*flex-direction: column;*/ /*flex-direction: column;*/
/*justify-content: space-around;*/ /*justify-content: space-around;*/
overflow: auto; overflow: auto;
} }
/*.home-cont > div {*/ /*.home-cont > div {*/
/*width: 100%;*/ /*width: 100%;*/
/*height: 23%;*/ /*height: 23%;*/
/*}*/ /*}*/
img { img {
width: 70px; width: 70px;
height: 70px; height: 70px;
opacity: 0.9; opacity: 0.9;
} }
.box-c { .box-c {
display: flex; display: flex;
border-radius: 20px; border-radius: 20px;
width: 700px; width: 700px;
margin: 0 auto; margin: 0 auto;
} }
.box-c + .box-c { .box-c + .box-c {
margin-top: 20px; margin-top: 20px;
} }
.box-c:nth-child(1) { .box-c:nth-child(1) {
background-image: linear-gradient(45deg, #10239e, #adc6ff) background-image: linear-gradient(45deg, #10239e, #adc6ff)
} }
.box-c:nth-child(4) { .box-c:nth-child(4) {
background-image: linear-gradient(45deg, #00474f, #87e8de) background-image: linear-gradient(45deg, #00474f, #87e8de)
} }
.box-c-1, .box-c-4 { .box-c-1, .box-c-4 {
display: flex; display: flex;
align-items: center; align-items: center;
box-shadow: 2px 2px 10px #888888; box-shadow: 2px 2px 10px #888888;
...@@ -155,9 +165,9 @@ ...@@ -155,9 +165,9 @@
} }
} }
.box-c-2, .box-c-3 { .box-c-2, .box-c-3 {
height: 180px; height: 180px;
...@@ -186,9 +196,9 @@ ...@@ -186,9 +196,9 @@
.cont { .cont {
margin-left: 30px; margin-left: 30px;
} }
} }
.box-c-2 { .box-c-2 {
> div:nth-child(1) { > div:nth-child(1) {
background-image: linear-gradient(45deg, #536DFE, #00B0Ff) background-image: linear-gradient(45deg, #536DFE, #00B0Ff)
} }
...@@ -198,9 +208,9 @@ ...@@ -198,9 +208,9 @@
margin-left: 30px; margin-left: 30px;
} }
} }
.box-c-3 { .box-c-3 {
> div:nth-child(1) { > div:nth-child(1) {
background-image: linear-gradient(45deg, #00BFA6, #0036ff) background-image: linear-gradient(45deg, #00BFA6, #0036ff)
} }
...@@ -209,17 +219,17 @@ ...@@ -209,17 +219,17 @@
background-image: linear-gradient(45deg, #0036ff, #00BFA6); background-image: linear-gradient(45deg, #0036ff, #00BFA6);
margin-left: 30px; margin-left: 30px;
} }
} }
.title { .title {
font-weight: bold; font-weight: bold;
font-size: 24px font-size: 24px
} }
.num { .num {
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
margin-top: 5px; margin-top: 5px;
} }
</style> </style>
...@@ -17,12 +17,14 @@ ...@@ -17,12 +17,14 @@
</template> </template>
<script> <script>
import indexImg10 from '../assets/index/10.png' import indexImg27 from '../assets/index/27.png'
import indexImg1 from '../assets/index/1.png' import indexImg10 from '../assets/index/10.png'
import indexImg11 from '../assets/index/11.png' import indexImg1 from '../assets/index/1.png'
import FooterBar from '@/components/FooterBar.vue' import indexImg11 from '../assets/index/11.png'
import indexImg13 from '../assets/index/13.png'
import FooterBar from '@/components/FooterBar.vue'
export default { export default {
name: "Home", name: "Home",
components: { components: {
FooterBar FooterBar
...@@ -30,18 +32,30 @@ ...@@ -30,18 +32,30 @@
data() { data() {
return { return {
menuList: [ menuList: [
{img: indexImg10, title: '抽样任务', uri: '/sampling_task/sampling_task'}, {img: indexImg27, title: '我创建的抽样计划', uri: '/sampling_plan/sampling_plan'},
{img: indexImg1, title: '抽样单管理', uri: '/sampling_list/sampling_task'}, {img: indexImg10, title: '我的双随机任务', uri: '/sampling_task/sampling_task'},
{img: indexImg11, title: '历史抽样单', uri: '/history_sampling/sampling_list'}, {img: indexImg1, title: '抽样信息录入', uri: '/sampling_list/sampling_task'},
{img: indexImg11, title: '历史任务', uri: '/history_sampling/sampling_list'},
{img: indexImg13, title: '双随机实现流程', uri: '/flow_chart'},
], ],
} }
}, },
mounted() {
const that = this
window.onresize = () => {
return (() => {
if (window.screen.width > 750) {
that.$router.replace('/home')
}
})()
}
},
methods: { methods: {
_goto(item) { _goto(item) {
this.$router.push(item.uri) this.$router.push(item.uri)
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
......
import Index from '@/page/Index' import Index from '@/page/Index'
import Home from '@/page/Home' import Home from '@/page/Home'
import HomeOld from '@/page/HomeOld'
import Login from '@/page/Login' import Login from '@/page/Login'
import ForgetPwd from '@/page/ForgetPwd' import ForgetPwd from '@/page/ForgetPwd'
import Message from '@/page/Message' import Message from '@/page/Message'
...@@ -32,6 +33,12 @@ export default [ ...@@ -32,6 +33,12 @@ export default [
meta: {title: "双随机抽样", leftArrow: false}, meta: {title: "双随机抽样", leftArrow: false},
}, },
{ {
path: "/home_old",
name: "homeOld",
component: HomeOld,
meta: {title: "双随机抽样", leftArrow: false},
},
{
path: "/login", path: "/login",
name: "login", name: "login",
component: Login, component: Login,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment