班级表去除备注字段

master
liuyunhu 2024-04-23 19:22:59 +08:00
parent bd1430dd86
commit ef8d1671c4
1 changed files with 26 additions and 23 deletions

View File

@ -34,7 +34,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['custom:class:add']"
>新增</el-button>
>新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -45,7 +46,8 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['custom:class:edit']"
>修改</el-button>
>修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -56,7 +58,8 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['custom:class:remove']"
>删除</el-button>
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -66,21 +69,21 @@
size="mini"
@click="handleExport"
v-hasPermi="['custom:class:export']"
>导出</el-button>
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="classList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="班级ID" align="center" prop="classId" />
<el-table-column label="班级名称" align="center" prop="className" />
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="班级ID" align="center" prop="classId"/>
<el-table-column label="班级名称" align="center" prop="className"/>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -89,14 +92,16 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['custom:class:edit']"
>修改</el-button>
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['custom:class:remove']"
>删除</el-button>
>删除
</el-button>
</template>
</el-table-column>
</el-table>
@ -113,7 +118,7 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="班级名称" prop="className">
<el-input v-model="form.className" placeholder="请输入班级名称" />
<el-input v-model="form.className" placeholder="请输入班级名称"/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
@ -121,12 +126,10 @@
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -137,7 +140,7 @@
</template>
<script>
import { listClass, getClass, delClass, addClass, updateClass } from "@/api/custom/class";
import {addClass, delClass, getClass, listClass, updateClass} from "@/api/custom/class";
export default {
name: "Class",
@ -174,10 +177,10 @@ export default {
//
rules: {
className: [
{ required: true, message: "班级名称不能为空", trigger: "blur" }
{required: true, message: "班级名称不能为空", trigger: "blur"}
],
status: [
{ required: true, message: "状态不能为空", trigger: "change" }
{required: true, message: "状态不能为空", trigger: "change"}
],
}
};
@ -209,8 +212,7 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
updateTime: null
};
this.resetForm("form");
},
@ -227,7 +229,7 @@ export default {
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.classId)
this.single = selection.length!==1
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
@ -269,12 +271,13 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const classIds = row.classId || this.ids;
this.$modal.confirm('是否确认删除班级管理编号为"' + classIds + '"的数据项?').then(function() {
this.$modal.confirm('是否确认删除班级管理编号为"' + classIds + '"的数据项?').then(function () {
return delClass(classIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {