diff --git a/src/api/user/stud.js b/src/api/user/stud.js
index b3d38b1..d86c210 100644
--- a/src/api/user/stud.js
+++ b/src/api/user/stud.js
@@ -1,15 +1,22 @@
import request from '@/utils/request'
//分页查询
export const stuPageService = (params) => {
- // console.log(params, 'params')
+ // console.log(params, 'params11')
return request.get(
`/api/studentManage/page?name=${params.name}&number=${params.number}&page=${params.page}&pageSize=${params.pagesize}&userId=${params.id}`,
)
}
-//获取学生
-export const stuListService = (id) => {
- return request.get(`/api/studentManage/${id}`)
+//学号查询
+export const stuNumberService = (params) => {
+ // console.log(params, 'params')
+ return request.get(
+ `/api/studentManage/page?number=${params.number}&page=${params.page}&pageSize=${params.pagesize}&userId=${params.id}`,
+ )
}
+//获取学生
+// export const stuListService = (id) => {
+// return request.get(`/api/studentManage/${id}`)
+// }
//删除和批量删除学生
export const delStuListService = (ids) => {
return request.delete(`/api/studentManage/batchDelete?ids=${ids}`)
@@ -18,7 +25,7 @@ export const delStuListService = (ids) => {
export const reStuPassService = (ids) => {
return request.put(`/api/studentManage/initialPassword?ids=${ids}`)
}
-//重置学生密码
+//重置状态
export const changeStaService = (status, id) => {
return request.post(`/api/studentManage/status/${status}?id=${id}`)
}
diff --git a/src/api/user/user.js b/src/api/user/user.js
index 4064558..84b69b7 100644
--- a/src/api/user/user.js
+++ b/src/api/user/user.js
@@ -33,10 +33,7 @@ export const userGetInfoService = (token) =>
})
//修改用户信息
export const userChangeService = (params) => {
- // return request.post('/api/user/update', jsonData, {
- // headers: { 'Content-Type': 'application/json;charset=UTF-8' },
- // })
- return request.post(`/api/user/update/PersonalInfo`, params)
+ return request.post(`/api/user/update`, params)
}
//获取个人信息
export const userIdenService = (id) => {
diff --git a/src/layout/tabbar/setting/index.vue b/src/layout/tabbar/setting/index.vue
index 22360a1..48a8784 100644
--- a/src/layout/tabbar/setting/index.vue
+++ b/src/layout/tabbar/setting/index.vue
@@ -87,11 +87,11 @@ const openWeb = (url, name) => {
//用户头像
onMounted(() => {
userStore.getUserInfo()
- console.log(userStore.data.icon, 'icon')
+ // console.log(userStore.data.icon, 'icon')
})
const logout = () => {
- console.log($route)
+ // console.log($route)
userStore.logout()
$router.push({
path: '/login',
diff --git a/src/router/routers.ts b/src/router/routers.ts
index 0352627..981c4a0 100644
--- a/src/router/routers.ts
+++ b/src/router/routers.ts
@@ -21,7 +21,7 @@ export const constantRoute: any = [
// },
// },
// ],
- redirect: '/curriculumCenter/basicCourseInformation',
+ redirect: '/home',
children: [
{
path: '/home',
@@ -45,6 +45,28 @@ export const constantRoute: any = [
icon: 'Notebook',
},
},
+ {
+ path: '/mssageManagement',
+ component: () => import('@/layout/index.vue'),
+ name: 'MssageManagement',
+ meta: {
+ title: '',
+ hidden: false,
+ icon: 'HomeFilled', // 菜单图标
+ },
+ children: [
+ {
+ path: '/mssageManagement/message',
+ component: () => import('@/views/message/index.vue'),
+ name: 'Message',
+ meta: {
+ title: '消息',
+ hidden: false,
+ icon: 'ChatDotSquare',
+ },
+ },
+ ],
+ },
{
path: '/curriculumCenter',
redirect: '/curriculumCenter/basicCourseInformation',
@@ -140,28 +162,7 @@ export const constantRoute: any = [
},
],
},
- // {
- // path: '/groupManagement',
- // component: () => import('@/layout/index.vue'),
- // name: 'GroupManagement',
- // meta: {
- // title: '',
- // hidden: false,
- // icon: 'HomeFilled', // 菜单图标
- // },
- // children: [
- // {
- // path: '/groupManagement/group',
- // component: () => import('@/views/group/index.vue'),
- // name: 'Group',
- // meta: {
- // title: '分组',
- // hidden: false,
- // icon: 'Operation',
- // },
- // },
- // ],
- // },
+
{
path: '/mssageManagement',
component: () => import('@/layout/index.vue'),
diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts
index 214a405..145f75e 100644
--- a/src/store/modules/user.ts
+++ b/src/store/modules/user.ts
@@ -87,15 +87,12 @@ const useUserStore = defineStore('User', {
async getUserInfo() {
const result: any = await userGetInfoService(GET_TKOEN('TOKEN'))
if (result.code === 200) {
- console.log(result, 'result')
+ // console.log(result, 'result')
+ // 获取用户个人信息
const res = await userIdenService(result.data.id)
- // console.log(res, 'res')
this.userInfo = res.data
- // console.log(this.userInfo, 'this.userInfo')
this.data = result.data
- // console.log(result, '123')
this.userName = result.data.username
- // this.avatar = result.data.checkUser.avatar
this.routes = result.data.permissions
return {
result,
diff --git a/src/views/MyCourseStudy/learningProcess.vue b/src/views/MyCourseStudy/learningProcess.vue
index e1353c6..fde2a54 100644
--- a/src/views/MyCourseStudy/learningProcess.vue
+++ b/src/views/MyCourseStudy/learningProcess.vue
@@ -15,7 +15,7 @@ const selectedIds = ref([])
const loading = ref(false)
const showCheckbox = ref(false)
-onMounted(()=>{
+onMounted(() => {
userStore.getUserInfo()
})
const params = ref({
@@ -23,13 +23,13 @@ const params = ref({
// pagenum: '1',
userId: userStore.data.id,
})
-console.log(userStore.data.id);
+console.log(userStore.data.id)
//获取浏览记录列表
const getrecordList = async () => {
loading.value = true
// const res = await getRecordListService(params.value)
const res = await LearningRecordsControllerService.courseLearningRecords(
- params.value.userId,
+ params.value.userId,
params.value.pagenum,
params.value.pagesize,
)
@@ -108,9 +108,7 @@ const deleteSelected = async () => {
})
// 调用已封装好的删除接口进行删除操作
- await LearningRecordsControllerService.deleteCourseRecords(
- selectedIds.value,
- )
+ await LearningRecordsControllerService.deleteCourseRecords(selectedIds.value)
.then(() => {
recordList.value = recordList.value.filter(
(item) => !selectedIds.value.includes(item.id),
@@ -125,12 +123,12 @@ const deleteSelected = async () => {
}
//跳转页面
const router = useRouter()
-const goToAnotherPage = (address,courseId) => {
+const goToAnotherPage = (address, courseId) => {
router.push({
- path:address,
- query:{
- courseId: courseId
- }
+ path: address,
+ query: {
+ courseId: courseId,
+ },
})
}
//
@@ -162,7 +160,17 @@ const goToAnotherPage = (address,courseId) => {
- -
+
-
diff --git a/src/views/home/components/Echart/Echarts.vue b/src/views/home/components/Echart/Echarts.vue
index c54a51b..77d34f3 100644
--- a/src/views/home/components/Echart/Echarts.vue
+++ b/src/views/home/components/Echart/Echarts.vue
@@ -12,7 +12,7 @@ const props = defineProps({
})
onMounted(() => {
- console.log(props.count.dateList, 'count')
+ // console.log(props.count.dateList, 'count')
const myChart = echarts.init(echarsDom.value)
// 绘制图表
myChart.setOption({
diff --git a/src/views/home/components/Lessonlist.vue b/src/views/home/components/Lessonlist.vue
index 97f5c30..01c3efb 100644
--- a/src/views/home/components/Lessonlist.vue
+++ b/src/views/home/components/Lessonlist.vue
@@ -30,7 +30,7 @@ const drawer = ref()
const flog = ref(false)
const onEditCourse = (item) => {
flog.value = true
- console.log(item, 'item')
+ // console.log(item, 'item')
drawer.value.open(item)
}
const onSuccess = () => {
@@ -67,13 +67,7 @@ onMounted(() => {
-
+
diff --git a/src/views/home/components/Status.vue b/src/views/home/components/Status.vue
index 3817738..0b4f5ba 100644
--- a/src/views/home/components/Status.vue
+++ b/src/views/home/components/Status.vue
@@ -61,7 +61,6 @@ const changeInfo = async () => {
//用户基本信息的显示与编辑
const dialog = ref(false)
-
const formLabelWidth = '68px'
const form = ref({
name: '',
@@ -89,10 +88,10 @@ const onCancel = () => {
//编辑表单提交
const onSubmit = async () => {
// const jsonData = JSON.stringify(form.value)
- console.log(form.value, 'jj')
+ // console.log(form.value, 'jj')
await userChangeService(form).then(() => {
ElMessage.success('修改成功')
- console.log(form.value, 'aaaa')
+ // console.log(form.value, 'aaaa')
emit('getInfo', form.value)
@@ -115,7 +114,7 @@ const onSubmit = async () => {
diff --git a/src/views/home/components/Welcome.vue b/src/views/home/components/Welcome.vue
index 2d1a493..4ea5c46 100644
--- a/src/views/home/components/Welcome.vue
+++ b/src/views/home/components/Welcome.vue
@@ -10,6 +10,7 @@ import useUserStore from '@/store/modules/user'
import { useRouter } from 'vue-router'
import { ElMessage, dayjs } from 'element-plus'
import { Edit, Back } from '@element-plus/icons-vue'
+
const props = defineProps({
name: {
type: String,
@@ -28,7 +29,7 @@ const pwdForm = ref({
new_pwd: '',
re_pwd: '',
})
-// console.log(props.userData.username, 'props.data')
+// console.log(props.userData, '22222')
//dialog显示隐藏
//信息
const dialogFormVisible = ref(false)
@@ -133,7 +134,8 @@ const rules = {
const infoRef = ref()
//修改用户信息
-const emit = defineEmits(['get-message'])
+const emit = defineEmits(['get-message', 'userInfoModified'])
+
const change = ref(true)
//验证码倒计时
const countdown = ref(0)
@@ -148,7 +150,6 @@ const toggleVisibility = () => {
const codecode = ref()
const codeSubmit = async () => {
await infoRef.value.validate()
- // console.log('开始发起注册验证码')
const phoness = form.value.newphone
userCodeRegisterService(phoness)
.then((response) => {
@@ -156,69 +157,78 @@ const codeSubmit = async () => {
console.log(codecode.value, 'codecode')
})
.catch((error) => {
- console.log(error.message, 'error')
+ ElMessage.error(error.newphone.message)
+ // console.log(error.newphone.message, 'error')
})
}
-// console.log(change.value == true, 'toggleVisibility.value == false')
-// if (toggleVisibility.value == 'false') {
-// console.log('值相等,为 false')
-// } else {
-// console.log('值不相等')
-// }
+const res = ref()
const changeInfo = async () => {
await infoRef.value.validate()
- if (change.value === true) {
- // console.log(form.value.phone, '原手机号')
+ // console.log(props.userData, '手机号props.data')
+ if (
+ // change.value === true ||
+ (change.value === true &&
+ props.userData.nickName !== form.value.nickName) ||
+ (change.value === false &&
+ form.value.newphone === '' &&
+ props.userData.nickName !== form.value.nickName &&
+ form.value.code === '')
+ ) {
await userChangeService({
phone: form.value.phone,
id: form.value.id,
nickName: form.value.nickName,
- }).then(() => {
+ }).then(async () => {
+ // console.log('修改11')
ElMessage.success('修改成功')
+ res.value = await userStore.getUserInfo()
+ res.value = res.value.result.data
+ // console.log(res.result.data, '修改用户1')
emit('get-message', form.value.nickName)
+ emit('userInfoModified', res)
+ dialogFormVisible.value = false
+
form.value.newphone = ''
form.value.code = ''
})
- dialogFormVisible.value = false
- } else {
+ } else if (
+ change.value === false &&
+ form.value.newphone !== form.value.phone &&
+ form.value.code !== ''
+ ) {
+ // console.log('修改22')
if (codecode.value === form.value.code) {
- // console.log(form.value.newphone, '新手机号')
- // console.log('验证码正确')
await userChangeService({
phone: form.value.newphone,
id: form.value.id,
nickName: form.value.nickName,
- }).then(() => {
+ }).then(async () => {
ElMessage.success('修改成功')
+ res.value = userStore.getUserInfo()
+ // res.value = res.result.data
+ // console.log(res.value, '修改用户hsouji')
+ // userStore.getUserInfo()
form.value.phone = form.value.newphone
- emit('get-phone', form.value.phone)
+ // emit('get-phone', form.value.phone)
+ emit('get-message', form.value.nickName)
+ emit('userInfoModified', res)
+ dialogFormVisible.value = false
+
form.value.newphone = ''
form.value.code = ''
})
- dialogFormVisible.value = false
} else {
ElMessage.error('验证码错误')
}
+ } else {
+ // console.log('修改33')
+ dialogFormVisible.value = false
}
}
-//修改密码
-const pwdRef = ref()
-const changePassword = async () => {
- await pwdRef.value.validate()
- await userChangeService({
- phone: form.value.phone,
- id: form.value.id,
- nickName: form.value.nickName,
- }).then(() => {
- ElMessage.success('修改成功')
- emit('get-message', form.value.nickName)
- form.value.newphone = ''
- form.value.code = ''
- })
- dialogFormVisible.value = false
-}
+
const cancleInfo = () => {
dialogFormVisible.value = false
+ form.value = { ...props.userData, code: '', newphone: '' }
}
//修改密码
const userStore = useUserStore()
@@ -341,7 +351,12 @@ onUnmounted(() => {
-
+
{
const name = ref()
const getMessage = (msg) => {
name.value = msg
+ // console.log(name.value, 'msg')
}
-const getPhone = (phone) => {
+
+//?
+// const getData = async () => {
+// const res = await userLookService(userStore.data.id)
+// // console.log(res.data, '11111')
+// data.value = res.data
+// }
+const getUserName = (username) => {
// console.log(msg, 'msg')
- userStore.data.phone = phone
- // console.log(data.value.icon, 'icon')
+ userStore.userName = username
+ // console.log(data.value.icon, 'icon');
}
+
const getAvater = (avater) => {
// console.log(msg, 'msg')
userStore.data.icon = avater
// console.log(data.value.icon, 'icon')
}
+
const getInfo = (info) => {
- console.log(userStore.userInfo, 'msg')
+ // console.log(userStore.userInfo, 'msg')
userStore.userInfo = info
// console.log(userStore.userData, 'icon111')
}
const courselist = ref([])
-const img = ref()
-const courseName = ref()
-const courseTea = ref()
+// const img = ref()
+// const courseName = ref()
+// const courseTea = ref()
//学习最多的知识点
const maxKnow = ref([])
const getmaxKnow = async () => {
const res = await userMaxKnowService(userStore.data.id)
maxKnow.value = res.data
- console.log(maxKnow.value, 'max')
+ // console.log(maxKnow.value, 'max')
+}
+function fetchNewUserInfo(res) {
+ // 更新 userInfo 的值
+ data.value = res
}
-
onMounted(() => {
// getData()
username.value = userStore.userName
@@ -85,14 +92,8 @@ onMounted(() => {
//最新收藏的课程
userNewLikeService(userStore.data.id).then((res) => {
loading.value = true
- // console.log(res.data, '最新收藏的课程')
courselist.value = res.data
loading.value = false
-
- // console.log(courselist.value.id, 'course')
- // img.value = res.data.img
- // courseName.value = res.data.name
- // courseTea.value = res.data.teacher
})
//echart图表
userLookService()
@@ -106,10 +107,10 @@ onMounted(() => {
@@ -124,7 +125,7 @@ onMounted(() => {
{
style="
font-size: 14px;
display: flex;
- /* margin: 0px auto; */
- margin: 0px 10px;
+ width: 90%;
+ margin: 0px auto;
+ /* margin: 0px 10px; */
+ margin-bottom: 5px;
"
>
{
:urouter="'/curriculumCenter/knowledgePoints'"
>
-
+
{{ item.label }}
@@ -161,11 +164,17 @@ onMounted(() => {
-
@@ -176,7 +185,10 @@ onMounted(() => {
href="#"
style="width: 90%; font-size: 14px; display: flex; margin: 0 auto"
>
-
+
@@ -198,7 +210,10 @@ onMounted(() => {
href="#"
style="width: 90%; font-size: 12px; display: flex; margin: 0 auto"
>
-
+
@@ -208,11 +223,9 @@ onMounted(() => {
:key="item.id"
v-loading="loading"
>
-
{{ index + 1 }}
{{ item.name || '暂无' }}
-
@@ -264,7 +277,6 @@ onMounted(() => {
justify-content: space-between;
}
.lesson {
- background-color: pink;
padding-top: 30px;
// padding-bottom: 30px;
padding: 25px 10px 0px 10px;
@@ -284,24 +296,32 @@ onMounted(() => {
// align-items: center;
// margin: 0 auto;
// background-color: yellow;
+
padding: 5px;
- margin-top: 5px;
+ // margin-top: 5px;
flex-wrap: wrap;
justify-content: space-evenly;
padding-bottom: 30px;
}
+.contt {
+ // background-color: yellow;
+ padding: 5px;
+
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ grid-gap: 11px;
+}
.button {
justify-content: space-between;
- margin-bottom: 5px;
+
height: 30px;
border-radius: 10px;
- // color: #0080ff;
+
text-align: center;
line-height: 30px;
- margin: 5px 10px;
- // border: 2px solid #ccc;
+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
- width: 40%;
+ width: 100%;
padding: 0px 15px;
overflow: hidden;
text-overflow: ellipsis;
@@ -344,6 +364,8 @@ ul {
}
.lessonlist-item {
+ // background-color: pink;
+
height: 50px;
// margin: 0 auto;
border-radius: 10px;
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index be167ec..0859984 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -1,6 +1,13 @@
+
+
+
+
+
+
+
-import { Search, Edit, Delete } from '@element-plus/icons-vue'
+import { Search, Edit, Delete, CircleClose } from '@element-plus/icons-vue'
import { ref, onMounted } from 'vue'
import {
- stuListService,
+ // stuListService,
stuPageService,
delStuListService,
reStuPassService,
changeStaService,
+ stuNumberService,
} from '@/api/user/stud'
import { ElMessage, ElMessageBox } from 'element-plus'
import useUserStore from '@/store/modules/user'
+import { tryOnMounted } from '@vueuse/core'
const userStore = useUserStore()
// console.log(userStore.data.id, 'icon') //用户信息
const formLabelWidth = '60px'
const tableData = ref([])
+const total = ref()
+const show = ref(false)
+const show1 = ref(false)
+
//是否是第一次加载
const isFirstLoad = ref(true)
const params = ref({
@@ -29,22 +35,14 @@ const getData = async () => {
loading.value = true
await stuPageService(params.value).then((res) => {
tableData.value = res.data.Records
- // console.log(tableData.value, 'params')
+ total.value = res.data.totalCount
+ console.log(tableData.value, 'params')
loading.value = false
- console.log(res.data, 'res.data')
+ // console.log(res.data.totalCount, 'res.data')
isFirstLoad.value = false
})
}
-//学生
-// const getData = async () => {
-// // id.value = userStore.data.id
-// // console.log(id.value, 'id.value')
-// stuListService(2).then((res) => {
-// tableData.value = res.data
-// console.log(res.data, 'res.data')
-// })
-// }
// 页面条数变化
const onSizeChange = (size) => {
//页面条数变化了,原本正在访问的页面变化,重新从第一页渲染即可
@@ -60,16 +58,12 @@ const onCurrentChange = (page) => {
params.value.page = page
getData()
}
-//重置
-const onReset = () => {
- params.value.page = 1
- getData()
-}
+
//搜索
-const onSearch = () => {
- params.value.pagenum = 1
- // getArticleService()
-}
+// const onSearch = () => {
+// params.value.pagenum = 1
+// // getArticleService()
+// }
const loading = ref(false)
//编辑
@@ -81,7 +75,7 @@ const editTable = (row) => {
}
//删除行
const delTable = async (row) => {
- console.log(row.userId, 'delrow')
+ // console.log(row.userId, 'delrow')
await ElMessageBox.confirm('您确定删除这条学生信息吗', '温馨提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
@@ -99,82 +93,150 @@ const delTable = async (row) => {
const selectedIds = ref([])
function handleSelectionChange(selection) {
selectedIds.value = selection.map((row) => row.userId)
- console.log(selectedIds.value, 'selectedIds.value')
+ // console.log(selectedIds.value, 'selectedIds.value')
}
const onDel = async () => {
- await ElMessageBox.confirm('您确定删除这些学生信息吗', '温馨提示', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- })
- await delStuListService(selectedIds.value).then(() => {
+ if (selectedIds.value.length !== 0) {
+ await ElMessageBox.confirm('确定删除学生信息吗', '温馨提示', {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ })
+ await delStuListService(selectedIds.value).then(() => {
+ ElMessage({
+ message: '删除成功',
+ type: 'success',
+ })
+ })
+ getData()
+ } else {
ElMessage({
- message: '删除成功',
- type: 'success',
+ message: '请选择要删除的学生',
})
- })
-
- getData()
+ }
}
//重置学生密码
const onResetPass = async () => {
- await ElMessageBox.confirm('您确定重置这些学生密码吗', '温馨提示', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning',
- })
- await reStuPassService(selectedIds.value).then(() => {
+ if (selectedIds.value.length !== 0) {
+ await ElMessageBox.confirm('确定重置密码吗', '温馨提示', {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning',
+ })
+ await reStuPassService(selectedIds.value).then(() => {
+ ElMessage({
+ message: '重置成功',
+ type: 'success',
+ })
+ })
+ getData()
+ } else {
ElMessage({
- message: '重置成功',
- type: 'success',
+ message: '请选择要重置密码的学生',
})
- })
- getData()
+ }
}
//状态
const status = ref()
+tableData.value.forEach((item) => {
+ item.status = item.status === 1
+})
async function handleStatusChange(row) {
status.value = row.status
- // console.log(status.value, 'status')
- // console.log(`状态更改: ${row.status}`)
- // if (!isFirstLoad.value) {
- // await changeStaService(status.value, row.userId).then(() => {
- // ElMessage({
- // message: '状态更改成功',
- // type: 'success',
- // })
- // })
- // }
- // getData()
+ console.log(status.value, 'status')
+ console.log(`状态更改: ${row.status}`)
+ if (!isFirstLoad.value) {
+ await changeStaService(status.value, row.userId).then(() => {
+ ElMessage({
+ message: '状态更改成功',
+ type: 'success',
+ })
+ })
+ }
+ getData()
}
+
+//姓名查询
+const studentName = ref()
+function onFocus1() {
+ show1.value = true
+}
+// function onBlur1() {
+// show1.value = true
+// }
+const closeName = () => {
+ show1.value = false
+ studentName.value = ''
+}
+const searchInfo = async () => {
+ params.value.name = studentName.value
+ // console.log(params.value.name, 'params.value.number')
+ if (studentName.value.trim() !== '') {
+ // show.value = true
+ // console.log(params.value.name, 'params')
+ await stuPageService({
+ page: 1,
+ pagesize: 3,
+ id: userStore.data.id,
+ name: studentName.value,
+ number: '',
+ }).then((res) => {
+ params.value.page = 1
+ console.log(res, 'change')
+ getData()
+ // studentName.value = ''
+ })
+ }
+}
+
//学号查询
const studentId = ref()
+function onFocus() {
+ show.value = true
+}
+function onblur1() {
+ show.value = false
+}
+// closeName
+const clearIdinput = () => {
+ show.value = false
+ studentId.value = ''
+}
const searchNumber = async () => {
+ // console.log(studentId.value, 'params.value.number')
+ // console.log(studentId.value > 0, 'params')
params.value.number = studentId.value
- console.log(params.value.number, 'params.value.number')
- await stuPageService(params.value).then((res) => {
- params.value.page = 1
- console.log(res, 'change')
- })
- // getData()
+ if (studentId.value > 0) {
+ await stuPageService({
+ page: 1,
+ pagesize: 3,
+ id: userStore.data.id,
+ name: '',
+ number: studentId.value,
+ }).then((res) => {
+ params.value.page = 1
+ getData()
+ })
+ }
+
+ // console.log(res, 'change')
}
-//查询
-const studentName = ref()
-const searchInfo = async () => {
- params.value.name = studentName.value
- console.log(params.value.name, 'params.value.number')
- await stuPageService(params.value).then((res) => {
- params.value.page = 1
- console.log(res, 'change')
- })
- // getData()
+//重置
+const onReset = () => {
+ params.value.page = 1
+ params.value.name = ''
+ params.value.number = ''
+ getData()
}
function clearInput() {
studentId.value = ''
}
+
function clearInput1() {
studentName.value = ''
}
+const value1 = ref(true)
+console.log(typeof value1.value, 'value2')
const changeStatus = async (row) => {}
onMounted(() => {
getData()
@@ -187,6 +249,7 @@ onMounted(() => {