develoop
ww 3 months ago
parent f98d241c38
commit 72be77b12b
  1. 4
      .env.development
  2. 2
      src/api/user/stud.js
  3. 26
      src/views/course/components/course-chapters.vue
  4. 28
      src/views/student/components/editStu.vue
  5. 10
      src/views/student/index.vue

@ -1,6 +1,6 @@
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
NODE_ENV = 'development'
VITE_APP_TITLE = '无糖运营平台'
# VITE_APP_BASE_API = 'http://127.0.0.1:8080'
VITE_APP_BASE_API = 'http://39.106.16.162:8080'
VITE_APP_BASE_API = 'http://127.0.0.1:8080'
# VITE_APP_BASE_API = 'http://39.106.16.162:8080'
http://localhost:5173/#/courseResourcesManagement/courseResources

@ -1,7 +1,7 @@
import request from '@/utils/request'
//分页查询
export const stuPageService = (params) => {
// console.log(params, 'params11')
console.log(params, 'paramsshaibei')
return request.get(
`/api/studentManage/page?name=${params.name}&number=${params.number}&page=${params.page}&pageSize=${params.pagesize}&userId=${params.id}`,
)

@ -134,18 +134,36 @@ const dataSource = ref<Tree[]>([
<h1>课程章节</h1>
<!-- <button @click="getChaptersList">获取</button> -->
<div class="custom-tree-container">
<el-tree style="max-width: 600px" :data="dataSource" node-key="id" default-expand-all
:expand-on-click-node="false" empty-text="暂无章节">
<el-tree
style="max-width: 600px"
:data="dataSource"
node-key="id"
default-expand-all
:expand-on-click-node="false"
empty-text="暂无章节"
>
<template #default="{ node, data }">
<span class="custom-tree-node">
<span @click="getDetails(data.id)">{{ data.name }}</span>
<span>
<el-button @click="append(data)" circle size="small" type="primary" plain>
<el-button
@click="append(data)"
circle
size="small"
type="primary"
plain
>
<el-icon :size="15">
<Plus />
</el-icon>
</el-button>
<el-button @click="remove(node, data)" circle size="small" type="danger" plain>
<el-button
@click="remove(node, data)"
circle
size="small"
type="danger"
plain
>
<el-icon :size="15">
<Delete />
</el-icon>

@ -87,9 +87,6 @@ const rules = {
],
}
function formatDate(yearAge) {
return new Date(yearAge).toISOString()
}
//
const onSubmit = async () => {
await formRef.value.validate()
@ -103,16 +100,11 @@ const onSubmit = async () => {
sex: formModel.value.sex,
nickName: formModel.value.nickName,
major: formModel.value.major,
// yearAge: formModel.value.yearAge,
}).then(() => {
ElMessage.success('修改成功')
drawer.value = false
// console.log('aa')
emit('success', 'edit')
// console.log(form.value, 'aaaa')
// res.value = userStore.getUserInfo()
// emit('getInfo', res.value)
// dialog.value = false
})
}
const onCancel = () => {
@ -168,24 +160,6 @@ defineExpose({
<el-form-item label="专业" prop="major">
<el-input v-model="formModel.major" placeholder="请输入专业" />
</el-form-item>
<el-form-item label="入学年分" prop="yearAge">
<el-date-picker
v-model="formModel.yearAge"
type="date"
placeholder="请选择入学年份"
:size="small"
style="width: 100%"
format="YYYY/MM/DD"
value-format="YYYY-MM-DD"
/>
<!-- <el-date-picker
v-model="formModel.yearAge"
type="datetime"
placeholder="Pick a Date"
format="YYYY/MM/DD hh:mm:ss"
value-format="YYYY-MM-DDThh:mm:ss"
/> -->
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-input v-model="formModel.createTime" readonly />
</el-form-item>

@ -34,10 +34,11 @@ const params = ref({
//
const getData = async () => {
loading.value = true
console.log(params.value, 'params')
await stuPageService(params.value).then((res) => {
tableData.value = res.data.Records
total.value = res.data.totalCount
console.log(tableData.value, 'params')
loading.value = false
// console.log(res.data.totalCount, 'res.data')
isFirstLoad.value = false
@ -237,7 +238,6 @@ onMounted(() => {
})
</script>
<template>
<page-container title="文章分类">
<el-card class="page-container">
<template #header>
<div class="card-header">
@ -336,7 +336,6 @@ onMounted(() => {
<el-table-column prop="nickName" label="昵称" />
<el-table-column prop="sex" label="性别" />
<el-table-column prop="major" label="专业" />
<el-table-column prop="yearAge" label="年级" />
<el-table-column prop="createTime" label="创建时间" width="200" />
<el-table-column prop="status" label="状态">
<template v-slot="scope">
@ -353,7 +352,6 @@ onMounted(() => {
<template #default="{ row }">
<el-button
type="primary"
size="small"
:icon="Edit"
circle
plain
@ -362,7 +360,6 @@ onMounted(() => {
<el-button
:icon="Delete"
type="danger"
size="small"
circle
plain
@click="delTable(row)"
@ -377,8 +374,6 @@ onMounted(() => {
v-model:current-page="params.page"
v-model:page-size="params.pagesize"
:page-sizes="[3, 5, 7, 10]"
:size="small"
:disabled="disabled"
:background="true"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@ -390,7 +385,6 @@ onMounted(() => {
<!-- <edit-stu ref="stuChange"></edit-stu> -->
<edit-stu ref="stuChange" @success="onSuccess()"></edit-stu>
</page-container>
</template>
<style lang="scss" scoped>

Loading…
Cancel
Save