From b0fb9cbf7eea64dd52a7c599a9504eb40ae643eb Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期一, 11 十一月 2024 15:32:44 +0800
Subject: [PATCH] 错题本分页
---
src/views/class-management/Class.vue | 87 ++++++++++++++++++++++++++-----------------
1 files changed, 53 insertions(+), 34 deletions(-)
diff --git a/src/views/class-management/Class.vue b/src/views/class-management/Class.vue
index e0f9651..35d3390 100644
--- a/src/views/class-management/Class.vue
+++ b/src/views/class-management/Class.vue
@@ -23,7 +23,7 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary" @click="page" size="small">鏌ヨ</el-button>
+ <el-button type="primary" size="small" @click="page">鏌ヨ</el-button>
</el-form-item>
</el-form>
</div>
@@ -37,7 +37,7 @@
>
<el-table-column
align="center"
- label="鐝骇"
+ label="鐝骇鍚嶇О"
prop="className"
width="180px"
></el-table-column>
@@ -60,9 +60,9 @@
<!-- ></el-table-column>-->
<el-table-column
align="center"
- width="100px"
+ width="300px"
label="鏁欏笀"
- prop="createUserName"
+ prop="teacherNamesStr"
></el-table-column>
<!-- <el-table-column-->
<!-- align="center"-->
@@ -91,11 +91,11 @@
<el-button v-show="scope.row.status !== '瑙f暎'" size="small" @click="handlerEdit(scope.row)"
type="primary">淇敼
</el-button>
- <el-button v-show="scope.row.status !== '瑙f暎'" size="small" type="warning">鐝骇楠岃瘉</el-button>
- <el-button v-show="scope.row.status !== '瑙f暎'" size="small" @click="handlerOpenNotify(scope.row)"
- type="info">閫氱煡
- </el-button>
- <el-button v-show="scope.row.status !== '瑙f暎'" @click="studentManager(scope.row.id)" size="small"
+<!-- <el-button v-show="scope.row.status !== '瑙f暎'" size="small" type="warning">鐝骇楠岃瘉</el-button>-->
+<!-- <el-button v-show="scope.row.status !== '瑙f暎'" size="small" @click="handlerOpenNotify(scope.row)"-->
+<!-- type="info">閫氱煡-->
+<!-- </el-button>-->
+ <el-button v-show="scope.row.status !== '瑙f暎'" @click="studentManager(scope.row.id,scope.row.className)" size="small"
type="success">鎴愬憳绠$悊
</el-button>
<el-popconfirm
@@ -123,25 +123,25 @@
<pagination v-show="total>0" :total="total" :page.sync="searchForm.currentPage"
:limit.sync="searchForm.pageSize"
@pagination="page"/>
- <el-dialog
- title="鐝骇閫氱煡"
- :visible.sync="notifyOpen"
- width="600px"
- :before-close="handleNotifyClose"
- :close-on-click-modal="false">
- <el-form :model="notifyForm" :rules="notifyRules" ref="notifyForm" label-width="100px" class="demo-ruleForm">
- <el-form-item label="閫氱煡鐝骇锛�" prop="className">
- <span>{{ notifyForm.className }}</span>
- </el-form-item>
- <el-form-item label="閫氱煡鍐呭锛�" prop="notifyContent">
- <el-input type="textarea" v-model="notifyForm.notifyContent" size="small"></el-input>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="handleNotifyClose">鍙� 娑�</el-button>
- <el-button type="primary" @click="submitNotifyForm">纭� 瀹�</el-button>
- </span>
- </el-dialog>
+<!-- <el-dialog-->
+<!-- title="鐝骇閫氱煡"-->
+<!-- :visible.sync="notifyOpen"-->
+<!-- width="600px"-->
+<!-- :before-close="handleNotifyClose"-->
+<!-- :close-on-click-modal="false">-->
+<!-- <el-form :model="notifyForm" :rules="notifyRules" ref="notifyForm" label-width="100px" class="demo-ruleForm">-->
+<!-- <el-form-item label="閫氱煡鐝骇锛�" prop="className">-->
+<!-- <span>{{ notifyForm.className }}</span>-->
+<!-- </el-form-item>-->
+<!-- <el-form-item label="閫氱煡鍐呭锛�" prop="notifyContent">-->
+<!-- <el-input type="textarea" v-model="notifyForm.notifyContent" size="small"></el-input>-->
+<!-- </el-form-item>-->
+<!-- </el-form>-->
+<!-- <span slot="footer" class="dialog-footer">-->
+<!-- <el-button @click="handleNotifyClose">鍙� 娑�</el-button>-->
+<!-- <el-button type="primary" @click="submitNotifyForm">纭� 瀹�</el-button>-->
+<!-- </span>-->
+<!-- </el-dialog>-->
<el-dialog
:title="title"
@@ -153,7 +153,17 @@
<el-form-item label="鐝骇鍚嶇О" prop="className">
<el-input v-model="form.className" size="small"></el-input>
</el-form-item>
- <el-form-item label="鐝骇鏃堕棿" required>
+ <el-form-item label="鑰佸笀閰嶇疆" prop="teacherList">
+ <el-select v-model="form.teacherList" multiple clearable size="small" placeholder="璇烽�夋嫨">
+ <el-option
+ v-for="item in teacherList"
+ :key="item.id"
+ :label="item.realName"
+ :value="item.id">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鐝骇鏃堕棿">
<el-col :span="11">
<el-form-item prop="startTime">
<el-date-picker
@@ -191,7 +201,7 @@
</template>
<script>
-import { addClasses, editClasses, getClassess, dissolution, recover } from '@/api/classes'
+import { addClasses, editClasses, getClassess, dissolution, recover, getTeacherList } from '@/api/classes'
import { addClassesNotify } from '@/api/classesNotify'
import Pagination from '@/components/Pagination'
@@ -199,6 +209,7 @@
components: { Pagination },
data () {
return {
+ teacherList: [],
notifyOpen: false,
notifyForm: {
className: '',
@@ -220,6 +231,7 @@
form: {
id: null,
className: '',
+ teacherList: [],
status: '',
verifyStatus: '',
startTime: null,
@@ -248,6 +260,11 @@
}
},
methods: {
+ getTeacherList () {
+ getTeacherList().then(res => {
+ this.teacherList = res.data.data
+ })
+ },
handlerOpenNotify (row) {
this.notifyOpen = true
this.notifyForm.className = row.className
@@ -286,6 +303,7 @@
this.form = {
id: null,
className: '',
+ teacherList: [],
status: '',
verifyStatus: '',
startTime: null,
@@ -322,7 +340,7 @@
this.page()
})
},
- recover(id) {
+ recover (id) {
recover(id).then(res => {
this.$message.success(res.data.message)
this.page()
@@ -352,8 +370,8 @@
this.title = '鏂板鐝骇'
},
// 璺宠浆(鏌ョ湅鐝骇浜哄憳鎯呭喌)
- studentManager (classesId) {
- this.$router.push({ path: '/classes/class-management/Class-staff', query: { classesId: classesId } })
+ studentManager (classesId,className) {
+ this.$router.push({ path: '/classes/class-management/Class-staff', query: { classesId: classesId, className: className } })
},
// 杩斿洖涓婁竴涓〉闈�
goBack () {
@@ -362,7 +380,8 @@
},
created () {
this.page()
- },
+ this.getTeacherList()
+ }
}
</script>
--
Gitblit v1.8.0