From 0dd300fe4ecdad02803509e3357b7700773bfac0 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 06 六月 2024 18:02:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/Manage/ClassManagement/Class.vue | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 59 insertions(+), 1 deletions(-)
diff --git a/src/views/Manage/ClassManagement/Class.vue b/src/views/Manage/ClassManagement/Class.vue
index 1662931..db5b41d 100644
--- a/src/views/Manage/ClassManagement/Class.vue
+++ b/src/views/Manage/ClassManagement/Class.vue
@@ -94,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>
@@ -114,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"
@@ -163,11 +181,18 @@
<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,
@@ -189,6 +214,12 @@
endTime: null,
remark: ""
},
+ notifyRules: {
+ notifyContent: [
+ { required: true, message: '璇疯緭鍏ラ�氱煡鍐呭', trigger: 'blur' },
+ { min: 1, max: 500, message: '闀垮害鍦� 1 鍒� 500 涓瓧绗�', trigger: 'blur' }
+ ],
+ },
rules: {
className: [
{ required: true, message: '璇疯緭鍏ョ彮绾у悕绉�', trigger: 'blur' },
@@ -207,6 +238,33 @@
};
},
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
--
Gitblit v1.8.0