From 9c211c0a699bd762c7ac85cf1371551244055f51 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期五, 07 六月 2024 14:07:53 +0800
Subject: [PATCH] feat:成绩管理-试卷内容展示
---
src/views/Manage/ClassManagement/Class.vue | 95 ++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 84 insertions(+), 11 deletions(-)
diff --git a/src/views/Manage/ClassManagement/Class.vue b/src/views/Manage/ClassManagement/Class.vue
index bca2c77..db5b41d 100644
--- a/src/views/Manage/ClassManagement/Class.vue
+++ b/src/views/Manage/ClassManagement/Class.vue
@@ -15,19 +15,25 @@
@click="handlerAdd"
>鏂板鐝骇</el-button>
</div>
- <div
- class="flex"
- style="align-items:center"
- >
- <p style="margin-left:20px;margin-right: 10px;">鎵�鍦ㄥ崟浣�</p>
-<!-- <el-select v-model="searchData.deptId">-->
-<!-- <el-option></el-option>-->
-<!-- </el-select>-->
- </div>
+ <el-form :inline="true" :model="searchForm" class="demo-form-inline">
+ <el-form-item label="鐝骇鍚嶇О">
+ <el-input v-model="searchForm.className" clearable @clear="page" placeholder="鐝骇鍚嶇О"></el-input>
+ </el-form-item>
+ <el-form-item label="鐝骇鐘舵��">
+ <el-select v-model="searchForm.status" clearable @change="page" placeholder="鐝骇鐘舵��">
+ <el-option label="姝e父" value="normal"></el-option>
+ <el-option label="瑙f暎" value="dissolution"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="page">鏌ヨ</el-button>
+ </el-form-item>
+ </el-form>
</div>
<div>
<div>
<el-table
+ v-loading="loading"
:data="tableData"
border
:row-style="{height:'42px'}"
@@ -44,7 +50,12 @@
align="center"
width="80px"
prop="status"
- ></el-table-column>
+ >
+ <template slot-scope="scope">
+ <el-tag v-if="scope.row.status === '姝e父'" type="success">{{scope.row.status}}</el-tag>
+ <el-tag v-if="scope.row.status === '瑙f暎'" type="danger">{{scope.row.status}}</el-tag>
+ </template>
+ </el-table-column>
<el-table-column
width="100px"
align="center"
@@ -83,7 +94,7 @@
<template slot-scope="scope">
<el-button size="small" @click="handlerEdit(scope.row)" type="primary">淇敼</el-button>
<el-button size="small" type="warning">鐝骇楠岃瘉</el-button>
- <el-button size="small" type="info">閫氱煡</el-button>
+ <el-button size="small" @click="handlerOpenNotify(scope.row)" type="info">閫氱煡</el-button>
<el-button @click="studentManager(scope.row.id)" size="small" type="success">鎴愬憳绠$悊</el-button>
<el-button v-if="scope.row.status !== '瑙f暎'" @click="dissolution(scope.row.id)" type="danger" size="small">瑙f暎</el-button>
</template>
@@ -103,6 +114,24 @@
</div>
+ <el-dialog
+ title="鐝骇閫氱煡"
+ :visible.sync="notifyOpen"
+ width="600px"
+ :before-close="handleClose">
+ <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"
@@ -152,16 +181,26 @@
<script>
import { addClasses, editClasses, getClassess, dissolution } from "@/api/classes";
+import { addClassesNotify } from "@/api/classesNotify";
import Pagination from "@/components/Pagination"
export default {
components: {Pagination},
data() {
return {
+ notifyOpen: false,
+ notifyForm: {
+ className: '',
+ notifyContent: '',
+ classesId: null
+ },
+ loading: true,
total: 0,
open: false,
title: "",
value: "",
searchForm: {
+ className:'',
+ status: '',
subject: null,
pageSize: 10,
pageNum: 1
@@ -174,6 +213,12 @@
startTime: null,
endTime: null,
remark: ""
+ },
+ notifyRules: {
+ notifyContent: [
+ { required: true, message: '璇疯緭鍏ラ�氱煡鍐呭', trigger: 'blur' },
+ { min: 1, max: 500, message: '闀垮害鍦� 1 鍒� 500 涓瓧绗�', trigger: 'blur' }
+ ],
},
rules: {
className: [
@@ -193,10 +238,38 @@
};
},
methods: {
+ handlerOpenNotify(row) {
+ this.notifyOpen = true
+ this.notifyForm.className = row.className
+ this.notifyForm.classesId = row.id
+ },
+ submitNotifyForm() {
+ this.$refs['notifyForm'].validate((valid) => {
+ if (valid) {
+ let _this = this
+ addClassesNotify(_this.notifyForm).then(res => {
+ this.$message.success(res.data.message)
+ this.notifyOpen = false
+ this.clearNotifyForm()
+ })
+ }
+ })
+ },
+ clearNotifyForm() {
+ this.notifyForm = {
+ className: '',
+ notifyContent: ''
+ }
+ },
+ handleNotifyClose() {
+ this.notifyOpen = false
+ this.clearNotifyForm()
+ },
page() {
getClassess(this.searchForm).then(res => {
this.tableData = res.data.data
this.total = res.data.total
+ this.loading = false
})
},
resetForm() {
--
Gitblit v1.8.0