diff --git a/src/views/home/components/Status.vue b/src/views/home/components/Status.vue
index 50e5e5e..bdeea9b 100644
--- a/src/views/home/components/Status.vue
+++ b/src/views/home/components/Status.vue
@@ -1,9 +1,11 @@
-
-
-
- 编辑
-
-
-
- 78
-
-
-
-
-
-
- cancel
-
- confirm
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/home/components/Welcome.vue b/src/views/home/components/Welcome.vue
index bfbcd11..afe7c54 100644
--- a/src/views/home/components/Welcome.vue
+++ b/src/views/home/components/Welcome.vue
@@ -64,6 +64,23 @@ const infoRules = {
},
],
}
+// ---
+//校验规则
+const checkOldSame = (rule, value, callback) => {
+ if (value === props.userData.password) {
+ callback(new Error('新密码不能与旧密码相同'))
+ } else {
+ callback()
+ }
+}
+const checkNewSame = (rule, value, cb) => {
+ if (value !== pwdForm.value.new_pwd) {
+ cb(new Error('新密码和确认再次输入的新密码不一样!'))
+ } else {
+ cb()
+ }
+}
+// ---
//密码校验
const rules = {
// 原密码
@@ -83,7 +100,7 @@ const rules = {
message: '密码长度必须是6-15位的非空字符串',
trigger: 'blur',
},
- // { validator: checkOldSame, trigger: 'blur' },
+ { validator: checkOldSame, trigger: 'blur' },
],
// 确认新密码
re_pwd: [
@@ -93,7 +110,7 @@ const rules = {
message: '密码长度必须是6-15位的非空字符串',
trigger: 'blur',
},
- // { validator: checkNewSame, trigger: 'blur' },
+ { validator: checkNewSame, trigger: 'blur' },
],
}
@@ -108,7 +125,6 @@ const changeInfo = async () => {
}
const jsonData = JSON.stringify(userInfo)
// const valid = await infoRef.value.validate()
-
await userChangeService(jsonData).then(() => {
ElMessage.success('修改成功')
emit('get-message', form.value.nickName)
@@ -142,21 +158,7 @@ const onSubmit = async () => {
const onReset = () => {
pwdForm.value = {}
}
-//校验规则
-const checkOldSame = (rule, value, callback) => {
- if (value === props.userData.password) {
- callback(new Error('新密码不能与旧密码相同'))
- } else {
- callback()
- }
-}
-const checkNewSame = (rule, value, cb) => {
- if (value !== pwdForm.value.new_pwd) {
- cb(new Error('新密码和确认再次输入的新密码不一样!'))
- } else {
- cb()
- }
-}
+//展示名称
const username = computed(() => {
if (props.userData.nickName) {
return props.userData.nickName
@@ -218,10 +220,10 @@ onMounted(() => {
>
-
+
-
+
diff --git a/src/views/home/components/infoContainer/index.vue b/src/views/home/components/infoContainer/index.vue
deleted file mode 100644
index 0d1725d..0000000
--- a/src/views/home/components/infoContainer/index.vue
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
{{ item.name }}
-
{{ item.content }}
-
-
-
-
-
-
diff --git a/src/views/home/components/myDrawer/index.vue b/src/views/home/components/myDrawer/index.vue
deleted file mode 100644
index 4f8cae9..0000000
--- a/src/views/home/components/myDrawer/index.vue
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
- 个人信息
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {}" size="medium">取消
- {}">确认
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取消
- 保存
-
-
-
-
-
-
-
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 012e44c..ffe8f0f 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -9,7 +9,7 @@ import lessonlist from './components/Lessonlist.vue'
import Student1 from './components/Student1.vue'
// import Class2 from './components/Class2.vue'
// import Student2 from './components/Student2.vue'
-import { userNewLikeService } from '@/api/user/user'
+import { userNewLikeService, userLookService } from '@/api/user/user'
import useUserStore from '@/store/modules/user'
import fe from '@/assets/images/fe.jpg'
import { ref, onMounted } from 'vue'
@@ -26,11 +26,9 @@ const rightVisible = ref(false)
userStore.getUserInfo().catch((error) => {
console.log(error)
})
-let sum: any = localStorage.getItem('sum') || '0'
const name = ref()
const getMessage = (msg) => {
name.value = msg
- // console.log(msg, 'msg')
}
const getAvater = (avater) => {
// console.log(msg, 'msg')
@@ -43,15 +41,12 @@ const courseName = ref()
const courseTea = ref()
onMounted(() => {
// getData()
- sum = parseInt(sum) + 1
- localStorage.setItem('sum', sum.toString())
- // console.log(sum, 'sum')
username.value = userStore.userName
data.value = userStore.data
infoData.value = userStore.userInfo
// console.log(data.value, '11111')
// console.log(userStore.userInfo, '22222') //个人信息
- console.log(userStore.data, 'icon') //用户信息
+ // console.log(userStore.data, 'icon') //用户信息
username.value = data.value.username
flag.value = true
role.value = data.value.roles[0]
@@ -73,6 +68,8 @@ onMounted(() => {
courseName.value = res.data.name
courseTea.value = res.data.teacher
})
+ //echart图表
+ userLookService()
})
@@ -154,7 +151,7 @@ onMounted(() => {
-
-
+
{{ courseName }}
{{ courseTea }}
@@ -189,7 +186,7 @@ onMounted(() => {
-
+
@@ -327,125 +324,8 @@ ul {
font-weight: bold;
}
p {
- // display: flex;
- // justify-content: end;
font-size: small;
color: #a0a5ab;
}
}
-
-// .lesson_container {
-// display: flex;
-// flex-direction: column;
-// justify-content: space-between;
-// margin: 0 auto;
-// padding: 5px 0;
-//
-
-// .lesson_container {
-// display: flex;
-// flex-direction: column;
-// justify-content: space-between;
-// margin: 0 auto;
-// padding: 5px 0;
-// }
-
-// .lessonlist-item-info {
-// padding: 10px;
-// display: flex;
-// flex-direction: column;
-// justify-content: space-between;
-// }
-// .lessonlist-item-info h3 {
-// font-size: 16px;
-// font-weight: bold;
-// margin-bottom: 5px;
-// }
-// .lessonlist-item-info .p {
-// width: 100%;
-// display: flex;
-// justify-content: end;
-// }
-// .lessonlist-item-info p {
-// font-size: 12px;
-// color: #a7c4f7;
-// line-height: 1.5;
-// box-sizing: border-box;
-// border: 2px solid #a7c4f7;
-// border-radius: 10px;
-// margin-bottom: 5px;
-// width: 50px;
-// margin: 5px;
-// text-align: center;
-// cursor: pointer;
-// }
-
-// .container {
-// display: flex;
-// width: 100%;
-// .left {
-// width: 80%;
-// height: 936px;
-// margin-right: 16px;
-// display: grid;
-// grid-template-rows: 1fr 1fr 1fr; /* 使用fr单位来平均分布 */
-// height: 300px; /* 设置容器高度 */
-
-// .info,
-// .echarts {
-// background: #ffffff;
-// box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
-// border-radius: 6px 6px 6px 6px;
-// margin-bottom: 16px;
-// display: flex;
-// // flex-direction: column; //开启纵向布局
-// justify-content: center;
-// align-items: center;
-// .info_container {
-// display: flex;
-// flex-direction: column; //开启纵向布局
-// justify-content: space-between;
-// }
-// }
-// .class {
-// width: 80%;
-// height: 444px;
-// background: #c57676;
-// box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
-// border-radius: 6px 6px 6px 6px;
-// display: flex;
-// // flex-direction: column; //开启纵向布局
-// justify-content: center;
-// align-items: center;
-// }
-// }
-// .right {
-// width: 20%;
-// height: 930px;
-// display: flex;
-// flex-direction: column; //开启纵向布局
-// justify-content: space-between;
-// .ident,
-// .class,
-// .stu {
-// background: #ffffff;
-// box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1);
-// border-radius: 6px 6px 6px 6px;
-// display: flex;
-// // flex-direction: column; //开启纵向布局
-// justify-content: center;
-// align-items: center;
-// .info_container {
-// display: flex;
-// flex-direction: column; //开启纵向布局
-// justify-content: space-between;
-// .info_content {
-// display: flex;
-// flex-direction: column; //开启纵向布局
-// justify-content: space-between;
-// }
-// }
-// }
-// }
-// }
diff --git a/src/views/student/index.vue b/src/views/student/index.vue
index e1cb97d..431a09d 100644
--- a/src/views/student/index.vue
+++ b/src/views/student/index.vue
@@ -1,5 +1,241 @@
+
- 学生
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+