提交 678f4fb6 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 班级详情页面修改为选项卡;创建学员增加所属班级字段;

上级 b6267977
...@@ -2,5 +2,5 @@ VITE_LOGIN_URL=https://login.ezijing.com/auth/login/index ...@@ -2,5 +2,5 @@ VITE_LOGIN_URL=https://login.ezijing.com/auth/login/index
VITE_BASE_URL=https://learn-api.ezijing.com VITE_BASE_URL=https://learn-api.ezijing.com
VITE_SECRET_ID=ezijing_f807b4fa39afd0f535260ebca7932676 VITE_SECRET_ID=ezijing_f807b4fa39afd0f535260ebca7932676
VITE_SECRET_KEY=1c0bf69718c780bed64d522a76942dd2 VITE_SECRET_KEY=1c0bf69718c780bed64d522a76942dd2
VITE_X_TRAINING_URL=https://x-training2.ezijing.com VITE_X_TRAINING_URL=https://x-training.ezijing.com
VITE_QBS_URL=https://qbs.ezijing.com VITE_QBS_URL=https://qa-center.ezijing.com
...@@ -3,4 +3,4 @@ VITE_BASE_URL=https://learn-api2.ezijing.com ...@@ -3,4 +3,4 @@ VITE_BASE_URL=https://learn-api2.ezijing.com
VITE_SECRET_ID=ezijing_f807b4fa39afd0f535260ebca7932676 VITE_SECRET_ID=ezijing_f807b4fa39afd0f535260ebca7932676
VITE_SECRET_KEY=1c0bf69718c780bed64d522a76942dd2 VITE_SECRET_KEY=1c0bf69718c780bed64d522a76942dd2
VITE_X_TRAINING_URL=https://x-training2.ezijing.com VITE_X_TRAINING_URL=https://x-training2.ezijing.com
VITE_QBS_URL=https://qbs.ezijing.com VITE_QBS_URL=https://qa-center.ezijing.com
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src" "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src"
}, },
"dependencies": { "dependencies": {
"axios": "^0.26.0", "axios": "^0.27.2",
"element-ui": "^2.15.6", "element-ui": "^2.15.8",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"query-string": "^7.1.1", "query-string": "^7.1.1",
"video.js": "^7.17.0", "video.js": "^7.18.1",
"vue": "^2.6.14", "vue": "^2.6.14",
"vue-meta": "^2.4.0", "vue-meta": "^2.4.0",
"vue-router": "^3.5.2", "vue-router": "^3.5.3",
"vuex": "^3.6.2" "vuex": "^3.6.2"
}, },
"devDependencies": { "devDependencies": {
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
"eslint-plugin-import": "^2.25.4", "eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.2.0", "eslint-plugin-promise": "^5.2.0",
"eslint-plugin-vue": "^8.5.0", "eslint-plugin-vue": "^8.7.1",
"sass": "1.49.9", "sass": "1.51.0",
"vite": "^2.8.6", "vite": "^2.9.8",
"vite-plugin-checker": "^0.4.2", "vite-plugin-checker": "^0.4.6",
"vite-plugin-vue2": "^1.9.3", "vite-plugin-vue2": "^2.0.0",
"vue-template-compiler": "^2.6.14" "vue-template-compiler": "^2.6.14"
} }
} }
<template> <template>
<app-card title="考试"> <div>
<app-list v-bind="tableOptions" ref="list"> <app-list v-bind="tableOptions" ref="list">
<template #header-aside> <template #header-aside>
<el-button type="primary" icon="el-icon-plus" @click="visible = true">添加</el-button> <el-button type="primary" icon="el-icon-plus" @click="visible = true">添加</el-button>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</template> </template>
</app-list> </app-list>
<class-exam-add :visible.sync="visible" @update="$emit('update')" v-if="visible"></class-exam-add> <class-exam-add :visible.sync="visible" @update="$emit('update')" v-if="visible"></class-exam-add>
</app-card> </div>
</template> </template>
<script> <script>
......
<template> <template>
<div> <app-card>
<el-tabs>
<el-tab-pane label="班级信息">
<ClassForm :detail="detail.info" />
</el-tab-pane>
<el-tab-pane label="课程">
<CourseList :detail="detail" :id="id" />
</el-tab-pane>
<el-tab-pane label="考试">
<class-exam :detail="detail" @update="getDetail"></class-exam>
</el-tab-pane>
<el-tab-pane label="教师">
<TeachList :detail="detail" :id="id" />
</el-tab-pane>
<el-tab-pane label="学员">
<StudentList :detail="detail" :id="id" />
</el-tab-pane>
</el-tabs>
<!-- 班级 --> <!-- 班级 -->
<app-card title="班级详情"> <!-- <app-card title="班级详情">
<ClassForm :detail="detail.info" /> <ClassForm :detail="detail.info" />
</app-card> </app-card> -->
<!-- 课程 --> <!-- 课程 -->
<app-card title="课程安排"> <!-- <app-card title="课程安排">
<CourseList :detail="detail" :id="id" /> <CourseList :detail="detail" :id="id" />
</app-card> </app-card> -->
<!-- 考试 --> <!-- 考试 -->
<class-exam :detail="detail" @update="getDetail"></class-exam> <!-- <class-exam :detail="detail" @update="getDetail"></class-exam> -->
<!-- 教务 --> <!-- 教务 -->
<app-card title="教师"> <!-- <app-card title="教师">
<TeachList :detail="detail" :id="id" /> <TeachList :detail="detail" :id="id" />
</app-card> </app-card> -->
<!-- 学员 --> <!-- 学员 -->
<app-card title="学员"> <!-- <app-card title="学员">
<StudentList :detail="detail" :id="id" /> <StudentList :detail="detail" :id="id" />
</app-card> -->
</app-card> </app-card>
</div>
</template> </template>
<script> <script>
......
...@@ -55,3 +55,10 @@ export function downStuList(params) { ...@@ -55,3 +55,10 @@ export function downStuList(params) {
export function deleteStudent(data) { export function deleteStudent(data) {
return httpRequest.post('/api/zy-admin/school/student/delete', data) return httpRequest.post('/api/zy-admin/school/student/delete', data)
} }
/**
* 获取班级列表
*/
export function getClassList(params) {
return httpRequest.get('/api/zy-admin/school/class/list', { params })
}
...@@ -17,11 +17,7 @@ ...@@ -17,11 +17,7 @@
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload> </el-upload>
<div style="margin-bottom: 10px; text-align: center"> <div style="margin-bottom: 10px; text-align: center">
导入模板下载:<a 导入模板下载:<a :href="templateUrl" download="人员模板"><el-button type="text">person_import.xlsx</el-button></a>
href="https://webapp-pub.ezijing.com/x-training-new/%E5%AD%A6%E5%91%98%E6%A8%A1%E6%9D%BF.xlsx"
download="人员模板"
><el-button type="text">person_import.xlsx</el-button></a
>
</div> </div>
<div style="text-align: center"> <div style="text-align: center">
<el-button size="mini" @click="cancel">取消</el-button> <el-button size="mini" @click="cancel">取消</el-button>
...@@ -41,6 +37,13 @@ export default { ...@@ -41,6 +37,13 @@ export default {
fileList: [] fileList: []
} }
}, },
computed: {
templateUrl() {
return this.$store.state.appConfig.tenant === 'financial'
? 'https://webapp-pub.ezijing.com/project/fd/FDC_%E5%AD%A6%E5%91%98%E6%A8%A1%E6%9D%BF.xlsx'
: 'https://webapp-pub.ezijing.com/project/fd/%E5%AD%A6%E5%91%98%E6%A8%A1%E6%9D%BF.xlsx'
}
},
mounted() { mounted() {
this.id = this.$route.query.id this.id = this.$route.query.id
}, },
......
...@@ -134,9 +134,6 @@ export default { ...@@ -134,9 +134,6 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .table-list-filter { ::v-deep .table-list-filter {
.filter-buttons {
margin-left: 110px;
}
.el-input { .el-input {
width: 194px; width: 194px;
} }
......
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
<el-form-item label="邮箱" prop="email"> <el-form-item label="邮箱" prop="email">
<el-input v-model="form.email"></el-input> <el-input v-model="form.email"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属班级" prop="class_id">
<el-select v-model="form.class_id" clearable placeholder="请选择所属班级">
<el-option :label="item.class_name" :value="item.id" v-for="item in classList" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="身份证号" prop="id_number"> <el-form-item label="身份证号" prop="id_number">
<el-input v-model="form.id_number" disabled></el-input> <el-input v-model="form.id_number" disabled></el-input>
</el-form-item> </el-form-item>
...@@ -46,7 +51,7 @@ ...@@ -46,7 +51,7 @@
</template> </template>
<script> <script>
import { getStudentDetail, createStudent, updateStudent } from '../api' import { getStudentDetail, createStudent, updateStudent, getClassList } from '../api'
export default { export default {
data() { data() {
return { return {
...@@ -57,7 +62,8 @@ export default { ...@@ -57,7 +62,8 @@ export default {
telephone: '', telephone: '',
sno: '', sno: '',
password: '', password: '',
email: '' email: '',
class_id: ''
}, },
rules: { rules: {
personal_name: [ personal_name: [
...@@ -70,7 +76,8 @@ export default { ...@@ -70,7 +76,8 @@ export default {
{ required: true, message: '请输入学号', trigger: 'blur' }, { required: true, message: '请输入学号', trigger: 'blur' },
{ min: 0, max: 40, message: '您最多可输入40 个字符', trigger: 'blur' } { min: 0, max: 40, message: '您最多可输入40 个字符', trigger: 'blur' }
] ]
} },
classList: []
} }
}, },
...@@ -79,6 +86,7 @@ export default { ...@@ -79,6 +86,7 @@ export default {
if (this.id) { if (this.id) {
this.getDetail() this.getDetail()
} }
this.getClassList()
}, },
methods: { methods: {
cancel() { cancel() {
...@@ -116,6 +124,11 @@ export default { ...@@ -116,6 +124,11 @@ export default {
this.$message.success('更新成功') this.$message.success('更新成功')
this.$router.go(-1) this.$router.go(-1)
}) })
},
getClassList() {
getClassList({ page: false }).then(res => {
this.classList = res.data.list
})
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论