bug
lohir
2024-10-16 eb010c8d0f12c4861d2fde556f8ca441ba5e10d9
src/views/class-management/Class.vue
@@ -13,7 +13,7 @@
    <div>
      <el-form :inline="true" :model="searchForm" class="demo-form-inline">
        <el-form-item label="班级名称">
          <el-input v-model="searchForm.className" size="small" clearable @clear="page"
          <el-input v-model="searchForm.className" size="small" clearable @clear="page" @input="page"
                    placeholder="班级名称"></el-input>
        </el-form-item>
        <el-form-item label="班级状态">
@@ -23,7 +23,7 @@
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="page">查询</el-button>
          <el-button type="primary" @click="page" size="small">查询</el-button>
        </el-form-item>
      </el-form>
    </div>
@@ -88,14 +88,14 @@
        fixed="right"
      >
        <template slot-scope="scope">
          <el-button v-if="scope.row.status !== '解散'" size="small" @click="handlerEdit(scope.row)"
          <el-button v-show="scope.row.status !== '解散'" size="small" @click="handlerEdit(scope.row)"
                     type="primary">修改
          </el-button>
          <el-button v-if="scope.row.status !== '解散'" size="small" type="warning">班级验证</el-button>
          <el-button v-if="scope.row.status !== '解散'" size="small" @click="handlerOpenNotify(scope.row)"
          <el-button v-show="scope.row.status !== '解散'" size="small" type="warning">班级验证</el-button>
          <el-button v-show="scope.row.status !== '解散'" size="small" @click="handlerOpenNotify(scope.row)"
                     type="info">通知
          </el-button>
          <el-button v-if="scope.row.status !== '解散'" @click="studentManager(scope.row.id)" size="small"
          <el-button v-show="scope.row.status !== '解散'" @click="studentManager(scope.row.id)" size="small"
                     type="success">成员管理
          </el-button>
          <el-popconfirm
@@ -103,7 +103,7 @@
            title="确定要解散该班级?"
            @confirm="dissolution(scope.row.id)"
          >
            <el-button slot="reference" v-if="scope.row.status !== '解散'" type="danger"
            <el-button slot="reference" v-show="scope.row.status !== '解散'" type="danger"
                       size="small">解散
            </el-button>
          </el-popconfirm>
@@ -112,7 +112,7 @@
            title="确定要恢复该班级吗?"
            @confirm="recover(scope.row.id)"
          >
            <el-button slot="reference" v-if="scope.row.status === '解散'" type="success"
            <el-button slot="reference" v-show="scope.row.status === '解散'" type="success"
                       size="small">恢复正常
            </el-button>
          </el-popconfirm>
@@ -120,14 +120,15 @@
      </el-table-column>
    </el-table>
      <pagination v-show="total>0" :total="total" :page.sync="searchForm.pageIndex"
      <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="handleClose">
      :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>
@@ -146,7 +147,8 @@
      :title="title"
      :visible.sync="open"
      width="700px"
      :before-close="handleClose">
      :before-close="handleClose"
      :close-on-click-modal="false">
      <el-form :model="form" :rules="rules" ref="form" label-width="100px" class="demo-ruleForm">
        <el-form-item label="班级名称" prop="className">
          <el-input v-model="form.className" size="small"></el-input>
@@ -213,7 +215,7 @@
        status: '',
        subject: null,
        pageSize: 10,
        pageNum: 1
        currentPage: 1
      },
      form: {
        id: null,
@@ -334,6 +336,17 @@
      this.open = false
      this.resetForm()
    },
    handleNotifyClose () {
      this.notifyOpen = false
      this.resetNotifyForm()
    },
    resetNotifyForm () {
      this.notifyForm = {
        className: '',
        notifyContent: '',
        classesId: null
      }
    },
    handlerAdd () {
      this.open = true
      this.title = '新增班级'