diff --git a/src/assets/charge.png b/src/assets/charge.png
new file mode 100644
index 0000000..e06bf8f
Binary files /dev/null and b/src/assets/charge.png differ
diff --git a/src/assets/css/SelfInfo.css b/src/assets/css/SelfInfo.css
index 55c8330..ddd58e8 100644
--- a/src/assets/css/SelfInfo.css
+++ b/src/assets/css/SelfInfo.css
@@ -37,4 +37,57 @@
width: 80px;
height: 80px;
margin: 40px auto;
+}
+
+
+/* 添加到你的 SelfInfo.css 文件中 */
+.avatar-container {
+ padding: 20px;
+ text-align: center;
+ background: #f8f9ff;
+ border-radius: 15px;
+ width: fit-content;
+}
+
+.edit-avatar {
+ margin-top: 10px;
+ font-size: 14px;
+}
+
+.el-descriptions {
+ background: #ffffff;
+ border-radius: 15px;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
+}
+
+/* 标签列的样式 */
+:deep(.el-descriptions__label) {
+ font-size: 16px;
+ color: #303133;
+ font-weight: bold;
+ padding: 30px;
+ background-color: #f8f9ff;
+}
+
+/* 内容列的样式 */
+:deep(.el-descriptions__content) {
+ font-size: 16px;
+ color: #606266;
+ padding: 30px;
+}
+
+/* 修改表格边框和分隔线的颜色 */
+:deep(.el-descriptions__body) {
+ border: 1px solid #ebeef5;
+}
+
+:deep(.el-descriptions__cell) {
+ border-bottom: 1px solid #ebeef5;
+}
+
+/* 修改按钮样式 */
+.el-button {
+ padding: 12px 20px;
+ font-size: 14px;
+ margin-top: 20px;
}
\ No newline at end of file
diff --git a/src/assets/js/Home.js b/src/assets/js/Home.js
index bbcf08d..9b05e87 100644
--- a/src/assets/js/Home.js
+++ b/src/assets/js/Home.js
@@ -1,33 +1,87 @@
import weather from "@/components/weather";
import Calender from "@/components/Calendar";
import request from "@/utils/request";
-import home_echarts from "@/components/home_echarts";
export default {
name: "Home",
components: {
weather,
Calender,
- home_echarts,
},
data() {
return {
+ waterFee: 0,
+ electricityFee: 0,
studentNum: "",
+ identity: null,
haveRoomStudentNum: "",
detailDialog: false,
repairOrderNum: "",
noFullRoomNum: "",
activities: [],
+ myName:"龚嘉伟",
+ mateName:[
+ '令狐新锐',
+ '令狐新锐',
+ '',
+ '公家为',
+ ],
+ price: 100000000,
};
},
+ mounted() {
+ this.loadIdentity();
+ },
created() {
this.getHomePageNotice();
this.getStuNum();
this.getHaveRoomNum();
this.getOrderNum();
this.getNoFullRoom();
+ this.getNameInfo();
},
methods: {
+ loadIdentity() {
+ // 从 sessionStorage 中获取 identity
+ const identity = window.sessionStorage.getItem("identity");
+ if (identity) {
+ // 将字符串转换为 JavaScript 对象
+ this.identity = JSON.parse(identity);
+ } else {
+ // 如果没有 identity,可能需要处理用户未登录的情况
+ }
+ },
+ async updateFees() {
+ // 当滑动条值改变时,调用此方法
+ const feesData = {
+ waterFee: this.waterFee,
+ electricityFee: this.electricityFee
+ };
+
+ // 发送请求到后端
+ request.post('/api/update-fees', feesData)
+ .then(response => {
+ // 处理响应
+ console.log('Fees updated successfully:', response.data);
+ })
+ .catch(error => {
+ // 处理错误
+ console.error('Error updating fees:', error);
+ });
+ },
+ async getNameInfo() {
+ request.get("").then((res) => {
+ if (res.code === "0") {
+ this.myName = res.data.name;
+ this.mateName = res.data.mateName;
+ } else {
+ ElMessage({
+ message: res.msg,
+ type: "error",
+ });
+ }
+ });
+ },
async getStuNum() {
request.get("/stu/stuNum").then((res) => {
if (res.code === "0") {
diff --git a/src/assets/school.png b/src/assets/school.png
new file mode 100644
index 0000000..1d4a5c8
Binary files /dev/null and b/src/assets/school.png differ
diff --git a/src/components/Aside.vue b/src/components/Aside.vue
index e849a3a..62d0ede 100644
--- a/src/components/Aside.vue
+++ b/src/components/Aside.vue
@@ -6,7 +6,7 @@
unique-opened
>
-
+
@@ -33,6 +33,7 @@
楼宇信息
房间信息
+ 晚点情况
@@ -43,6 +44,7 @@
公告信息
报修信息
+ 缴费信息
@@ -69,6 +71,18 @@
我的宿舍
+
+
+
+
+ 缴费信息
+
+
+
+
+
+ 晚间点名
+
diff --git a/src/router/index.js b/src/router/index.js
index 858a373..baee740 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -12,12 +12,16 @@ export const constantRoutes = [
{path: '/dormManagerInfo', name: 'DormManagerInfo', component: () => import("@/views/DormManagerInfo")},
{path: '/buildingInfo', name: 'BuildingInfo', component: () => import("@/views/BuildingInfo")},
{path: '/roomInfo', name: 'RoomInfo', component: () => import("@/views/RoomInfo")},
+ {path: '/callInfo', name: 'callInfo', component: () => import("@/views/callInfo")},
{path: '/noticeInfo', name: 'NoticeInfo', component: () => import("@/views/NoticeInfo")},
{path: '/adjustRoomInfo', name: 'AdjustRoomInfo', component: () => import("@/views/AdjustRoomInfo")},
{path: '/repairInfo', name: 'RepairInfo', component: () => import("@/views/RepairInfo")},
+ {path: '/feeInfo', name: 'feeInfo', component: () => import("@/views/feeInfo")},
{path: '/visitorInfo', name: 'VisitorInfo', component: () => import("@/views/VisitorInfo")},
//
{path: '/myRoomInfo', name: 'MyRoomInfo', component: () => import("@/views/MyRoomInfo")},
+ {path: '/chargeFee', name: 'chargeFee', component: () => import("@/views/chargeFee")},
+ {path: '/callStu', name: 'callStu', component: () => import("@/views/callStu")},
{path: '/applyRepairInfo', name: 'ApplyRepairInfo', component: () => import("@/views/ApplyRepairInfo")},
{path: '/applyChangeRoom', name: 'ApplyChangeRoom', component: () => import("@/views/ApplyChangeRoom")},
@@ -37,16 +41,16 @@ router.beforeEach((to, from, next) => {
// next 是函数,表示放行
// next() 放行
// next('/*') 强制跳转
- const user = window.sessionStorage.getItem('user')
- if (to.path === '/Login') {
- return next();
- }
- if (!user) {
- return next('/Login')
- }
- if (to.path === '/' && user) {
- return next('/home')
- }
+ // const user = window.sessionStorage.getItem('user')
+ // if (to.path === '/Login') {
+ // return next();
+ // }
+ // if (!user) {
+ // return next('/Login')
+ // }
+ // if (to.path === '/' && user) {
+ // return next('/home')
+ // }
next()
})
diff --git a/src/views/Home.vue b/src/views/Home.vue
index a775d2c..c95a91f 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -57,17 +57,78 @@
-
+
宿舍学生人数分布
+ font-weight: bold;
+ ">{{ myName }},欢迎您!
-
+
+
+
+
+
+
+
A床
+
{{ mateName[0] || '暂无' }}
+
+
+
B床
+
{{ mateName[1] || '暂无' }}
+
+
+
+
+
+
C床
+
{{ mateName[2] || '暂无' }}
+
+
+
D床
+
{{ mateName[3] || '暂无' }}
+
+
+
+
+
+
+
+ 水电费收款凭证
+
+
+ 您水电费收入{{ price }}元
+
+
+
设置水费
+
+
+
+
+
设置电费
+
+
+
+
+
@@ -100,11 +161,11 @@
border: 2px #2e4057;
}
.left{
-display: flex;
-width: 100%
-;margin-top: 40px;
-align-items: center;
-justify-content: center;
+ display: flex;
+ width: 100%;
+ margin-top: 40px;
+ align-items: center;
+ justify-content: center;
}
.el-colDiv {
margin: 20px auto;
@@ -198,5 +259,62 @@ justify-content: center;
background-color: #008789;
}
+.roommate-container {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+}
+.roommate-row {
+ display: flex;
+ justify-content: space-around;
+ margin: 10px 0;
+}
+
+.roommate-box {
+ width: 200px;
+ height: 150px;
+ border: 2px solid #4B70E2;
+ border-radius: 20px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background: rgba(75, 112, 226, 0.1);
+ transition: transform 0.3s ease;
+}
+
+.roommate-box:hover {
+ transform: scale(1.05);
+ box-shadow: 0 0 15px rgba(75, 112, 226, 0.3);
+}
+
+.bed-label {
+ font-size: 24px;
+ font-weight: bold;
+ color: #4B70E2;
+ margin-bottom: 10px;
+}
+
+.mate-name {
+ font-size: 20px;
+ color: #333;
+}
+
+.slider-demo-block {
+ max-width: 600px;
+ display: flex;
+ align-items: center;
+ margin-bottom: 50px
+}
+.slider-demo-block .el-slider {
+ margin-top: 0;
+ margin-left: 40px;
+}
+.set-word {
+ font-size: 20px;
+ font-weight: bold;
+ margin-bottom: 20px;
+}
\ No newline at end of file
diff --git a/src/views/SelfInfo.vue b/src/views/SelfInfo.vue
index 4eb4ae8..fa09895 100644
--- a/src/views/SelfInfo.vue
+++ b/src/views/SelfInfo.vue
@@ -4,16 +4,19 @@
首页
个人信息
-
-
-
+
+
+
-
+
@@ -25,7 +28,14 @@
-
+
@@ -93,13 +103,17 @@
{{ email }}
-
-
-
-
+
+
+
+
+
+
-
diff --git a/src/views/StudentHome.vue b/src/views/StudentHome.vue
index ec5fa14..0958eb4 100644
--- a/src/views/StudentHome.vue
+++ b/src/views/StudentHome.vue
@@ -65,7 +65,7 @@
margin-left: 10px;
">宿舍学生人数分布
-
+
@@ -87,18 +87,19 @@
-
+
+
\ No newline at end of file
diff --git a/src/views/callStu.vue b/src/views/callStu.vue
new file mode 100644
index 0000000..f708c1c
--- /dev/null
+++ b/src/views/callStu.vue
@@ -0,0 +1,235 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ buttonText }}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/chargeFee.vue b/src/views/chargeFee.vue
new file mode 100644
index 0000000..cf14612
--- /dev/null
+++ b/src/views/chargeFee.vue
@@ -0,0 +1,68 @@
+
+
+
这个月的水费是-------
+
{{ waterFee }}元!!
+
+
这个月的电费是-------
+
{{ electricityFee }}元!!
+
+
请立即缴费~~~
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/feeInfo.vue b/src/views/feeInfo.vue
new file mode 100644
index 0000000..e544e61
--- /dev/null
+++ b/src/views/feeInfo.vue
@@ -0,0 +1,27 @@
+
+
+ 发布水电费
+
+
+
+
+
\ No newline at end of file
diff --git a/vue.config.js b/vue.config.js
index ea30b8c..c9a8994 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -7,7 +7,7 @@ module.exports = {
// port: 9876,
proxy: { //设置代理,必须填
'/api': { //设置拦截器 拦截器格式 斜杠+拦截器名字,名字可以自己定
- target: 'http://localhost:8083', //代理的目标地址
+ target: 'http://10.133.65.6:8083', //代理的目标地址
changeOrigin: true, //是否设置同源,输入是的
pathRewrite: { //路径重写
'^/api': '' //选择忽略拦截器里面的内容