final
This commit is contained in:
parent
3c566d0c37
commit
6423161488
15
README.md
15
README.md
@ -1,30 +1,35 @@
|
||||
<<<<<<< HEAD
|
||||
|
||||
# student-information-sys-front
|
||||
|
||||
学生信息管理系统的前端工程。
|
||||
=======
|
||||
============================
|
||||
|
||||
# student-information-sys
|
||||
|
||||
## Project setup
|
||||
|
||||
```
|
||||
pnpm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
|
||||
```
|
||||
pnpm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
|
||||
```
|
||||
pnpm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
|
||||
```
|
||||
pnpm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
>>>>>>> 5ea95bc (init)
|
||||
### 后端接口配置
|
||||
|
||||
修改文件src/apiConfig.js中的apiUrl,空字符串表示前后端位于同一台服务器。
|
||||
|
||||
14
src/App.vue
14
src/App.vue
@ -22,13 +22,19 @@
|
||||
<span slot="title">课程信息</span>
|
||||
</el-menu-item>
|
||||
</router-link>
|
||||
<router-link to="teacher">
|
||||
<router-link to="course">
|
||||
<el-menu-item index="3">
|
||||
<i class="el-icon-s-management"></i>
|
||||
<span slot="title">教师信息</span>
|
||||
<i class="el-icon-menu"></i>
|
||||
<span slot="title">课程信息</span>
|
||||
</el-menu-item>
|
||||
</router-link>
|
||||
<el-menu-item index="4" @click="logout">
|
||||
<router-link to="score">
|
||||
<el-menu-item index="4">
|
||||
<i class="el-icon-s-management"></i>
|
||||
<span slot="title">学分信息</span>
|
||||
</el-menu-item>
|
||||
</router-link>
|
||||
<el-menu-item index="5" @click="logout">
|
||||
<i class="el-icon-s-management"></i>
|
||||
<span slot="title">退出登录</span>
|
||||
</el-menu-item>
|
||||
|
||||
@ -32,6 +32,12 @@ const routes = [
|
||||
name: 'teacher',
|
||||
component: () => import('../views/teacher/teacherList.vue'),
|
||||
meta: { requiresAuth: true }
|
||||
},
|
||||
{
|
||||
path: '/score',
|
||||
name: 'score',
|
||||
component: () => import('../views/score/scoreView.vue'),
|
||||
// meta: { requiresAuth: true }
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
91
src/views/score/scoreView.vue
Normal file
91
src/views/score/scoreView.vue
Normal file
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs v-model="activeName" @tab-click="changeTab">
|
||||
<el-tab-pane label="学生成绩" name="stu">
|
||||
<!-- 查询表单 -->
|
||||
<el-row :gutter="30">
|
||||
<el-col :span="8"><el-input v-model="studentCode" placeholder="学号"></el-input></el-col>
|
||||
<el-col :span="3"><el-button type="primary" @click="searchByStu">查询</el-button></el-col>
|
||||
</el-row>
|
||||
<br><br>
|
||||
<!-- 查询结果集 -->
|
||||
<el-descriptions title="查询结果:">
|
||||
<el-descriptions-item label="学生姓名">{{ studentScore.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学号">{{ studentScore.code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学分">{{ studentScore.score }}</el-descriptions-item>
|
||||
<el-descriptions-item label="课程数">{{ studentScore.count }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="课程成绩" name="cou">
|
||||
<!-- 查询表单 -->
|
||||
<el-row :gutter="30">
|
||||
<el-col :span="8">
|
||||
<el-select v-model="couresSearchId" multiple filterable remote reserve-keyword placeholder="请输入关键词"
|
||||
:remote-method="remoteMethod" :loading="loading">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="3"><el-button type="primary" @click="searchByStu">查询</el-button></el-col>
|
||||
</el-row>
|
||||
<br><br>
|
||||
<!-- 查询结果集 -->
|
||||
<el-table :data="scoreList"></el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeName: "stu",
|
||||
studentCode: '',
|
||||
studentScore: {name:'',code:'',score:'',count:0},
|
||||
scoreList:{},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
},
|
||||
searchByStu(){
|
||||
$.ajax({
|
||||
url: this.$apiUrl + "/scoreAction/getByStu",
|
||||
method: "GET",
|
||||
data: {studentCode: this.studentCode},
|
||||
success:(data)=>{
|
||||
if (data.success){
|
||||
this.studentScore.code = this.studentCode;
|
||||
this.studentScore.name = data.msg;
|
||||
this.studentScore.score = data.data;
|
||||
this.studentScore.count = data.count;
|
||||
} else{
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '查询失败',
|
||||
showClose: true
|
||||
});
|
||||
}
|
||||
},
|
||||
error: (xhr) => {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请求数据失败,code=' + xhr.status,
|
||||
showClose: true
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
searchByCou(){},
|
||||
},
|
||||
mounted(){},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user