Skip to content

Commit 0c4e2cf

Browse files
committed
'updtae'
1 parent 0c9a41b commit 0c4e2cf

File tree

14 files changed

+1060
-240
lines changed

14 files changed

+1060
-240
lines changed

package-lock.json

Lines changed: 53 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"lint": "vue-cli-service lint"
99
},
1010
"dependencies": {
11+
"axios": "^1.4.0",
1112
"core-js": "^3.8.3",
1213
"echarts": "^5.4.2",
1314
"element-ui": "^2.15.13",
@@ -41,6 +42,7 @@
4142
"parser": "@babel/eslint-parser"
4243
},
4344
"rules": {
45+
"no-control-regex": 0,
4446
"no-unused-vars": "off",
4547
"no-mixed-spaces-and-tabs": 0
4648
}

src/App.vue

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,50 @@
11
<template>
22
<div id="app">
3-
<div v-if="infoType===0">
3+
<div v-if="this.infoType===0">
44
<StartPageVue @login="changeInfoType"/>
55
</div>
6-
<div v-else-if="infoType===1">
6+
<div v-else-if="this.infoType===1">
77
<BasePageVue/>
8-
<div id="container"><router-view></router-view></div>
8+
<div id="container"><router-view @logout="logout"></router-view></div>
9+
</div>
10+
<div v-else-if="this.infoType===2">
11+
<CommonBasePageVue/>
12+
<div id="container"><router-view @logout="logout"></router-view></div>
913
</div>
1014
</div>
1115
</template>
1216

1317
<script>
1418
import StartPageVue from './components/StartPage/StartPage.vue'
1519
import BasePageVue from './components/BasePage/BasePage.vue'
20+
import CommonBasePageVue from './components/BasePage/CommonBasePage.vue'
1621
export default {
1722
data(){
1823
return{
19-
infoType : 0
24+
infoType:0
2025
}
2126
},
27+
mounted(){
28+
console.log(this.infoType);
29+
},
2230
methods:{
2331
changeInfoType(t){
2432
this.$router.push('/',()=>{},()=>{})
25-
this.infoType = t
33+
if(!t)
34+
this.infoType=2
35+
else
36+
this.infoType = t
37+
console.log(this.infoType);
38+
},
39+
logout(){
40+
this.infoType = 0
2641
}
2742
},
2843
name:'App',
2944
components:{
3045
BasePageVue,
31-
StartPageVue
46+
StartPageVue,
47+
CommonBasePageVue
3248
}
3349
}
3450
</script>
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
<template>
2+
<div id="basePage">
3+
<div class="top-guide">
4+
<span id="links">{{pageName}}</span>
5+
<span id="name">Tom</span>
6+
<span id="avatar"><a href="#"><img src="../../assets/sleepCat.jpg" alt="user's avatar"></a></span>
7+
<span id="help"><a href="#">帮助</a></span>
8+
<span id="helpImg"><a href="#"><img class="question" src="../../assets/问号.png" alt="help"></a></span>
9+
</div>
10+
<div id="left-guide">
11+
<ul>
12+
<li><img src="../../assets/HIT.png" alt="" style="width:185px;"></li>
13+
<li :class="liObject[0]" @click ="turnToUser(0)"><div class="left-div"></div><div class="textDiv" href="#">工位预约</div></li>
14+
<li :class="liObject[1]" @click ="turnToUser(1)"><div class="left-div"></div><div class="textDiv" href="#">个人主页</div></li>
15+
</ul>
16+
</div>
17+
</div>
18+
</template>
19+
20+
<script>
21+
export default {
22+
data(){
23+
return{
24+
pageName : '导航',
25+
liObject:[]
26+
}
27+
},
28+
methods:{
29+
turnToUser(target){
30+
this.liObject = new Array(7)
31+
this.liObject.splice(target,1,"curPage")
32+
switch(target){
33+
case 0:
34+
this.pageName = '工位预约'
35+
this.$router.push("/reservation",()=>{},()=>{})
36+
break;
37+
case 1:
38+
this.pageName = '个人主页'
39+
this.$router.push("/user",()=>{},()=>{})
40+
break;
41+
}
42+
}
43+
},
44+
props:{
45+
url:String
46+
}
47+
}
48+
</script>
49+
50+
<style scoped>
51+
*{
52+
margin: 0;
53+
padding: 0;
54+
font-family:微软雅黑;
55+
}
56+
#basePage{
57+
height: 900px;
58+
width: 1544px;
59+
background-color: rgb(215, 215, 215);
60+
}
61+
a{
62+
text-decoration: none;
63+
}
64+
.curPage{
65+
background-color: rgb(16,141,233,0.6) !important;
66+
}
67+
/* 以下为左侧导航栏 */
68+
#left-guide{
69+
position: absolute;
70+
left: 0;
71+
height: 890px;
72+
width: 224px;
73+
background-color: rgb(63, 63, 63);
74+
}
75+
#left-guide li{
76+
list-style-type: none;
77+
margin-top: 25px;
78+
margin-bottom: 10px;
79+
text-align: center;
80+
font-size: 12px;
81+
}
82+
#left-guide ul>li:nth-of-type(n+2){
83+
position:relative;
84+
display: inline-block;
85+
margin: 0px;
86+
width: 100%;
87+
height: 42px;
88+
background-color: rgb(63, 63, 63);
89+
line-height: 42px;
90+
text-align: left;
91+
font-size: 15px;
92+
font-family: Microsoft YaHei;
93+
color: rgb(255,255,255);
94+
}
95+
#left-guide ul>li:nth-of-type(n+2):hover{
96+
cursor:pointer;
97+
}
98+
.left-div{
99+
position: absolute;
100+
height: 11px;
101+
width: 11px;
102+
top: 16px;
103+
left: 18px;
104+
background-color: rgb(126, 126, 126);
105+
border: 1px;
106+
border-color: rgb(149, 149, 149);
107+
}
108+
.textDiv{
109+
height: 100%;
110+
width: 78%;
111+
display: block;
112+
color:gray;
113+
padding-left: 40px;
114+
}
115+
116+
/* 以下为顶部导航栏 */
117+
.top-guide{
118+
position:absolute;
119+
top:0;
120+
width: 1544px;
121+
height: 64px;
122+
background-color: rgb(255,255,255);
123+
}
124+
125+
.top-guide>span{
126+
float: right;
127+
margin-top: 20px;
128+
}
129+
#links{
130+
float: none;
131+
display: inline-block;
132+
font-size: large;
133+
font-weight: 700;
134+
color: rgb(101,101,101);
135+
margin-left: 250px;
136+
margin-top: 30px;
137+
}
138+
/* #links>a{
139+
font-size: medium;
140+
color: rgb(153, 153, 153);
141+
}
142+
#links>a:last-of-type{
143+
font-size: large;
144+
font-weight: 700;
145+
color: rgb(101,101,101);
146+
} */
147+
#name,#help{
148+
margin-right: 100px;
149+
margin-top: 25px;
150+
font-size: medium;
151+
color: rgb(153, 153, 153);
152+
}
153+
#avatar{
154+
margin-right: 15px;
155+
height: 36px;
156+
width: 36px;
157+
border-radius: 18px;
158+
overflow: hidden;
159+
text-align: center center;
160+
}
161+
#avatar img{
162+
height: 36px;
163+
width: 36px;
164+
}
165+
#help{
166+
margin-right: 24px;
167+
}
168+
#help>a{
169+
color: rgb(153, 153, 153);
170+
}
171+
#helpImg{
172+
margin-top: 28px;
173+
margin-right: 15px;
174+
}
175+
.question{
176+
width: 20px;
177+
height: 20px;
178+
}
179+
</style>

src/components/LayoutPage/LayoutPage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</el-form>
2424
<div slot="footer">
2525
<el-button type="primary">修改</el-button>
26-
<el-button>取消</el-button>
26+
<el-button @click="isChange = false">取消</el-button>
2727
</div>
2828
</el-dialog>
2929
<el-dialog title="区域修改" :visible.sync="isAdd">

0 commit comments

Comments
 (0)