diff --git a/ruoyi-ui/src/views/benyi/assessment/index.vue b/ruoyi-ui/src/views/benyi/assessment/index.vue index 5cc722d79..715af1a72 100644 --- a/ruoyi-ui/src/views/benyi/assessment/index.vue +++ b/ruoyi-ui/src/views/benyi/assessment/index.vue @@ -32,18 +32,13 @@ <el-table v-loading="loading" :data="childList" + border @selection-change="handleSelectionChange" > <el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column label="编号" align="center" prop="id" /> --> <!-- <el-table-column label="幼儿园名称" align="center" prop="schoolid" /> --> - <el-table-column - label="班级名称" - align="center" - prop="classid" - :formatter="classFormat" - /> - <el-table-column label="幼儿姓名" align="center" prop="name"> + <el-table-column fixed label="幼儿姓名" align="center" prop="name"> <template slot-scope="scope"> <router-link :to="'/benyi/assessmentchildhistory/student/' + scope.row.id" @@ -53,6 +48,12 @@ </router-link> </template> </el-table-column> + <el-table-column + label="班级名称" + align="center" + prop="classid" + :formatter="classFormat" + /> <el-table-column label="幼儿出生日期" align="center" prop="csrq" /> <el-table-column label="性别" @@ -67,6 +68,7 @@ :formatter="statusFormat" /> <el-table-column + fixed="right" label="操作" align="center" class-name="small-padding fixed-width" diff --git a/ruoyi-ui/src/views/benyi/checkindetail/index.vue b/ruoyi-ui/src/views/benyi/checkindetail/index.vue index 2a6cd1c8f..51b67a407 100644 --- a/ruoyi-ui/src/views/benyi/checkindetail/index.vue +++ b/ruoyi-ui/src/views/benyi/checkindetail/index.vue @@ -75,13 +75,14 @@ >新增</el-button > <el-button - type="success" - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleUpdate" - v-hasPermi="['benyi:checkindetail:edit']" - >修改</el-button> + type="success" + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['benyi:checkindetail:edit']" + >修改</el-button + > <el-button type="danger" icon="el-icon-delete" @@ -102,6 +103,7 @@ </div> <el-table + border v-loading="loading" :data="detailList" @selection-change="handleSelectionChange" @@ -114,14 +116,14 @@ /> <!-- <el-table-column label="编号" align="center" prop="id" /> --> <!-- <el-table-column label="学校编码" align="center" prop="schoolid" /> --> + <!-- <el-table-column label="幼儿编码" align="center" prop="childid" /> --> + <el-table-column fixed label="幼儿姓名" align="center" prop="childname" /> <el-table-column label="班级名称" align="center" prop="classid" :formatter="classFormat" /> - <!-- <el-table-column label="幼儿编码" align="center" prop="childid" /> --> - <el-table-column label="幼儿姓名" align="center" prop="childname" /> <el-table-column label="出勤类型" align="center" @@ -140,6 +142,7 @@ </el-table-column> <!-- <el-table-column label="创建人" align="center" prop="createuserid" /> --> <el-table-column + fixed="right" label="操作" align="center" width="120" @@ -177,7 +180,12 @@ /> <!-- 添加或修改幼儿考勤对话框 --> - <el-dialog :title="title" :visible.sync="open" class="v-dialog" append-to-body> + <el-dialog + :title="title" + :visible.sync="open" + class="v-dialog" + append-to-body + > <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="选择幼儿" prop="childname"> <el-checkbox @@ -187,7 +195,7 @@ :disabled="isable" >全选</el-checkbox > - <div style="margin: 15px 0;"></div> + <div style="margin: 15px 0"></div> <el-checkbox-group v-model="checkedChilds" @change="handlecheckedChildsChange" @@ -228,7 +236,7 @@ import { delDetail, addDetail, updateDetail, - exportDetail + exportDetail, } from "@/api/benyi/checkindetail"; import { listByCheck, listChild } from "@/api/benyi/child"; @@ -274,7 +282,7 @@ export default { childname: undefined, type: undefined, createuserid: undefined, - createTime: undefined + createTime: undefined, }, // 表单参数 form: {}, @@ -284,17 +292,19 @@ export default { { required: true, message: "请至少选择一个幼儿", - trigger: "blur" - } + trigger: "blur", + }, ], - type: [{ required: true, message: "出勤类型不能为空", trigger: "blur" }] - } + type: [ + { required: true, message: "出勤类型不能为空", trigger: "blur" }, + ], + }, }; }, created() { this.getList(); this.getClassList(); - this.getDicts("sys_dm_cqzt").then(response => { + this.getDicts("sys_dm_cqzt").then((response) => { this.checkinOptions = response.data; }); }, @@ -311,7 +321,7 @@ export default { }, //班级列表 getClassList() { - listClass(null).then(response => { + listClass(null).then((response) => { this.classOptions = response.rows; }); }, @@ -324,7 +334,7 @@ export default { // return this.selectDictLabel(this.classOptions, row.classid); var actions = []; var datas = this.classOptions; - Object.keys(datas).map(key => { + Object.keys(datas).map((key) => { if (datas[key].bjbh == "" + row.classid) { actions.push(datas[key].bjmc); return false; @@ -335,7 +345,7 @@ export default { /** 查询幼儿考勤列表 */ getList() { this.loading = true; - listDetail(this.queryParams).then(response => { + listDetail(this.queryParams).then((response) => { this.detailList = response.rows; // console.log(response.rows); this.total = response.total; @@ -357,7 +367,7 @@ export default { childname: undefined, type: undefined, createuserid: undefined, - createTime: undefined + createTime: undefined, }; this.resetForm("form"); @@ -375,7 +385,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.id); + this.ids = selection.map((item) => item.id); this.single = selection.length != 1; this.multiple = !selection.length; }, @@ -385,7 +395,7 @@ export default { this.isable = false; this.open = true; this.title = "幼儿考勤"; - listByCheck(null).then(response => { + listByCheck(null).then((response) => { this.childs = response.rows; }); }, @@ -394,9 +404,9 @@ export default { this.reset(); this.isable = true; const id = row.id || this.ids; - getDetail(id).then(response => { + getDetail(id).then((response) => { this.form = response.data; - listChild(null).then(response => { + listChild(null).then((response) => { this.childs = response.rows; }); this.checkedChilds.push(response.data.childid); @@ -405,8 +415,8 @@ export default { }); }, /** 提交按钮 */ - submitForm: function() { - this.$refs["form"].validate(valid => { + submitForm: function () { + this.$refs["form"].validate((valid) => { if (valid) { if (this.form.childname == "") { this.msgError("请至少选择一个幼儿"); @@ -414,7 +424,7 @@ export default { } if (valid) { if (this.form.id != undefined) { - updateDetail(this.form).then(response => { + updateDetail(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("修改考勤成功"); this.open = false; @@ -423,7 +433,7 @@ export default { }); } else { //提交 - addDetail(this.form).then(response => { + addDetail(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("添加考勤成功"); this.open = false; @@ -444,17 +454,17 @@ export default { { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", } ) - .then(function() { + .then(function () { return delDetail(ids); }) .then(() => { this.getList(); this.msgSuccess("删除成功"); }) - .catch(function() {}); + .catch(function () {}); }, /** 导出按钮操作 */ handleExport() { @@ -462,21 +472,21 @@ export default { this.$confirm("是否确认导出所有幼儿考勤数据项?", "警告", { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", }) - .then(function() { + .then(function () { return exportDetail(queryParams); }) - .then(response => { + .then((response) => { this.download(response.msg); }) - .catch(function() {}); + .catch(function () {}); }, handleCheckAllChange(val) { // this.checkedChilds = val ? this.childs : []; // this.isIndeterminate = false; this.checkedChilds = []; - this.childs.forEach(item => { + this.childs.forEach((item) => { //当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去 this.checkedChilds.push(item.id); }); @@ -485,7 +495,7 @@ export default { //console.log(this.checkedChilds); var cids = ""; - this.checkedChilds.forEach(item => { + this.checkedChilds.forEach((item) => { //当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去 cids = cids + item + ","; }); @@ -500,13 +510,13 @@ export default { //console.log(this.checkedChilds); var cids = ""; - this.checkedChilds.forEach(item => { + this.checkedChilds.forEach((item) => { //当全选被选中的时候,循环遍历源数据,把数据的每一项加入到默认选中的数组去 cids = cids + item + ","; }); console.log(cids); this.form.childname = cids; - } - } + }, + }, }; </script> diff --git a/ruoyi-ui/src/views/benyi/child/index.vue b/ruoyi-ui/src/views/benyi/child/index.vue index 67aeee6fb..6a7807932 100644 --- a/ruoyi-ui/src/views/benyi/child/index.vue +++ b/ruoyi-ui/src/views/benyi/child/index.vue @@ -71,14 +71,14 @@ >新增</el-button > <el-button - type="success" - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleUpdate" - v-hasPermi="['benyi:child:edit']" - >修改</el-button - > + type="success" + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['benyi:child:edit']" + >修改</el-button + > <el-button type="danger" icon="el-icon-delete" @@ -123,20 +123,26 @@ <el-table v-loading="loading" + border :data="childList" @selection-change="handleSelectionChange" > <el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column label="编号" align="center" prop="id" /> --> <!-- <el-table-column label="幼儿园名称" align="center" prop="schoolid" /> --> + <el-table-column fixed label="姓名" align="center" prop="name" /> <el-table-column label="班级名称" align="center" prop="classid" :formatter="classFormat" /> - <el-table-column label="姓名" align="center" prop="name" /> - <el-table-column label="家长手机号码" width="120" align="center" prop="phone" /> + <el-table-column + label="家长手机号码" + width="120" + align="center" + prop="phone" + /> <el-table-column label="性别" align="center" @@ -179,6 +185,7 @@ :formatter="statusFormat" /> <el-table-column + fixed="right" label="操作" align="center" width="120" @@ -214,7 +221,12 @@ /> <!-- 添加或修改幼儿信息对话框 --> - <el-dialog :title="title" :visible.sync="open" class="big-dialog" append-to-body> + <el-dialog + :title="title" + :visible.sync="open" + class="big-dialog" + append-to-body + > <el-tabs type="border-card"> <el-tab-pane label="幼儿基础信息"> <el-row :gutter="15"> @@ -659,7 +671,7 @@ import { addChild, updateChild, updateChild_tb, - importTemplate + importTemplate, } from "@/api/benyi/child"; import { listContactpeople, @@ -667,7 +679,7 @@ import { getContactpeopleByChildId, delContactpeople, addContactpeople, - updateContactpeople + updateContactpeople, } from "@/api/benyi/contactpeople"; import { listClass } from "@/api/system/class"; @@ -687,22 +699,22 @@ export default { placeholders: { province: "请选择省", city: "请选择市", - area: "请选择区" + area: "请选择区", }, diglogForm: { province: null, city: null, - area: null + area: null, }, diglogForm1: { province: null, city: null, - area: null + area: null, }, diglogForm2: { province: null, city: null, - area: null + area: null, }, // 连接内容 inviteCode: "", @@ -750,7 +762,7 @@ export default { // 设置上传的请求头部 headers: { Authorization: "Bearer " + getToken() }, // 上传的地址 - url: process.env.VUE_APP_BASE_API + "/benyi/child/importData" + url: process.env.VUE_APP_BASE_API + "/benyi/child/importData", }, // 查询参数 queryParams: { @@ -794,7 +806,7 @@ export default { firstLanguage: undefined, seconderLanguage: undefined, otherLanguage: undefined, - createuserid: undefined + createuserid: undefined, }, // 表单参数 form: {}, @@ -805,44 +817,44 @@ export default { // 表单校验 rules: { name: [ - { required: true, message: "幼儿姓名不能为空", trigger: "blur" } + { required: true, message: "幼儿姓名不能为空", trigger: "blur" }, ], phone: [ - { required: true, message: "家长手机号码不能为空", trigger: "blur" } + { required: true, message: "家长手机号码不能为空", trigger: "blur" }, ], - classid: [{ required: true, message: "班级不能为空", trigger: "blur" }] + classid: [{ required: true, message: "班级不能为空", trigger: "blur" }], }, rules_tb: { - classid: [{ required: true, message: "班级不能为空", trigger: "blur" }] - } + classid: [{ required: true, message: "班级不能为空", trigger: "blur" }], + }, }; }, created() { this.getList(); this.getClassList(); - this.getDicts("sys_user_sex").then(response => { + this.getDicts("sys_user_sex").then((response) => { this.sexOptions = response.data; }); - this.getDicts("sys_normal_disable").then(response => { + this.getDicts("sys_normal_disable").then((response) => { this.statusOptions = response.data; }); - this.getDicts("sys_dm_mz").then(response => { + this.getDicts("sys_dm_mz").then((response) => { this.mzOptions = response.data; }); - this.getDicts("sys_yes_no").then(response => { + this.getDicts("sys_yes_no").then((response) => { this.ynOptions = response.data; }); - this.getDicts("sys_dm_ryqd").then(response => { + this.getDicts("sys_dm_ryqd").then((response) => { this.sourceOptions = response.data; }); - this.getDicts("sys_dm_jtgx").then(response => { + this.getDicts("sys_dm_jtgx").then((response) => { this.jtgxOptions = response.data; }); this.getLink(); }, components: { //省市区三级联动全局组件 - VDistpicker + VDistpicker, }, methods: { /** 导入按钮操作 */ @@ -852,7 +864,7 @@ export default { }, // 链接内容 getLink() { - getUserProfile().then(response => { + getUserProfile().then((response) => { var domain = window.location.host; //console.log(domain); //this.user = response.data; @@ -862,14 +874,14 @@ export default { // 给家长发送链接 copy(e, text) { const clipboard = new Clipboard(e.target, { text: () => text }); - clipboard.on("success", e => { + clipboard.on("success", (e) => { this.msgSuccess("复制成功"); // 释放内存 clipboard.off("error"); clipboard.off("success"); clipboard.destroy(); }); - clipboard.on("error", e => { + clipboard.on("error", (e) => { // 不支持复制 this.msgError("手机权限不支持复制功能"); // 释放内存 @@ -904,7 +916,7 @@ export default { // return this.selectDictLabel(this.classOptions, row.classid); var actions = []; var datas = this.classOptions; - Object.keys(datas).map(key => { + Object.keys(datas).map((key) => { if (datas[key].bjbh == "" + row.classid) { actions.push(datas[key].bjmc); return false; @@ -913,14 +925,14 @@ export default { return actions.join(""); }, getClassList() { - listClass(null).then(response => { + listClass(null).then((response) => { this.classOptions = response.rows; }); }, /** 查询幼儿信息列表 */ getList() { this.loading = true; - listChild(this.queryParams).then(response => { + listChild(this.queryParams).then((response) => { this.childList = response.rows; this.total = response.total; this.loading = false; @@ -979,7 +991,7 @@ export default { seconderLanguage: undefined, otherLanguage: undefined, createuserid: undefined, - createTime: undefined + createTime: undefined, }; this.diglogForm.province = ""; @@ -1015,7 +1027,7 @@ export default { gmphone: undefined, gmaddress: undefined, gmoffphone: undefined, - createTime: undefined + createTime: undefined, }; this.resetForm("form_jhr"); }, @@ -1031,7 +1043,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.id); + this.ids = selection.map((item) => item.id); this.single = selection.length != 1; this.multiple = !selection.length; }, @@ -1045,7 +1057,7 @@ export default { async handleUpdate(row) { this.reset(); const id = row.id || this.ids; - await getChild(id).then(response => { + await getChild(id).then((response) => { this.form = response.data; this.diglogForm.province = response.data.birthProvincename; @@ -1064,20 +1076,20 @@ export default { this.title = "修改幼儿信息"; //根据幼儿id获取监护人信息 - getContactpeopleByChildId(this.form.id).then(res => { + getContactpeopleByChildId(this.form.id).then((res) => { // console.log("childid:" + this.form.id + ";jhr:" + res.data); this.form_jhr = res.data; }); }); }, /** 提交按钮 */ - submitForm: function() { - this.$refs["form"].validate(valid => { + submitForm: function () { + this.$refs["form"].validate((valid) => { if (valid) { if (this.form.id != undefined) { - updateChild(this.form).then(response => { + updateChild(this.form).then((response) => { if (response.code === 200) { - updateContactpeople(this.form_jhr).then(res => { + updateContactpeople(this.form_jhr).then((res) => { if (res.code === 200) { this.msgSuccess("修改成功"); this.open = false; @@ -1087,11 +1099,11 @@ export default { } }); } else { - addChild(this.form).then(response => { + addChild(this.form).then((response) => { // console.log(response); if (response.code === 200) { this.form_jhr.childid = response.data; - addContactpeople(this.form_jhr).then(res => { + addContactpeople(this.form_jhr).then((res) => { this.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -1103,11 +1115,11 @@ export default { }); }, /** 提交按钮 */ - submitForm_tb: function() { - this.$refs["form"].validate(valid => { + submitForm_tb: function () { + this.$refs["form"].validate((valid) => { if (valid) { console.log(this.ids + "---" + this.form.classid); - updateChild_tb(this.form, this.ids).then(response => { + updateChild_tb(this.form, this.ids).then((response) => { if (response.code === 200) { this.msgSuccess("调班成功"); this.open_tb = false; @@ -1127,23 +1139,19 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids; - this.$confirm( - '是否确认删除幼儿信息编号为"' + ids + '"的数据项?', - "警告", - { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - } - ) - .then(function() { + this.$confirm("是否确认删除幼儿信息数据项?", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(function () { return delChild(ids); }) .then(() => { this.getList(); this.msgSuccess("删除成功"); }) - .catch(function() {}); + .catch(function () {}); }, //所在省市区触发联动方法 onSelected_brith(data) { @@ -1201,7 +1209,7 @@ export default { }, /** 下载模板操作 */ importTemplate() { - importTemplate().then(response => { + importTemplate().then((response) => { this.download(response.msg); }); }, @@ -1220,7 +1228,7 @@ export default { // 提交上传文件 submitFileForm() { this.$refs.upload.submit(); - } - } + }, + }, }; </script> diff --git a/ruoyi-ui/src/views/benyi/contactpeople/index.vue b/ruoyi-ui/src/views/benyi/contactpeople/index.vue index f2e276c67..165c39370 100644 --- a/ruoyi-ui/src/views/benyi/contactpeople/index.vue +++ b/ruoyi-ui/src/views/benyi/contactpeople/index.vue @@ -86,6 +86,7 @@ </div> <el-table + border v-loading="loading" :data="contactpeopleList" @selection-change="handleSelectionChange" diff --git a/ruoyi-ui/src/views/benyi/schoolcalendar/index.vue b/ruoyi-ui/src/views/benyi/schoolcalendar/index.vue index 3ef4ed76b..46e8e1621 100644 --- a/ruoyi-ui/src/views/benyi/schoolcalendar/index.vue +++ b/ruoyi-ui/src/views/benyi/schoolcalendar/index.vue @@ -87,13 +87,14 @@ >新增</el-button > <el-button - type="success" - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleUpdate" - v-hasPermi="['benyi:schoolcalendar:edit']" - >修改</el-button> + type="success" + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['benyi:schoolcalendar:edit']" + >修改</el-button + > <el-button type="danger" icon="el-icon-delete" @@ -114,6 +115,7 @@ </div> <el-table + border v-loading="loading" :data="schoolcalendarList" @selection-change="handleSelectionChange" @@ -125,7 +127,7 @@ :selectable="checkSelectable" /> <!-- <el-table-column label="编号" align="center" prop="id" /> --> - <el-table-column label="名称" align="center" prop="name" /> + <el-table-column fixed label="名称" align="center" prop="name" /> <el-table-column label="活动类型" align="center" @@ -167,6 +169,7 @@ </template> </el-table-column> <el-table-column + fixed="right" label="操作" align="center" width="120" @@ -275,7 +278,7 @@ import { delSchoolcalendar, addSchoolcalendar, updateSchoolcalendar, - exportSchoolcalendar + exportSchoolcalendar, } from "@/api/benyi/schoolcalendar"; export default { @@ -312,7 +315,7 @@ export default { pickerOptions0: { disabledDate(time) { return time.getTime() < Date.now() - 8.64e7; - } + }, }, // 查询参数 queryParams: { @@ -325,7 +328,7 @@ export default { deptid: undefined, activitytime: undefined, createuserid: undefined, - createtime: undefined + createtime: undefined, }, // 表单参数 form: {}, @@ -333,26 +336,26 @@ export default { rules: { name: [{ required: true, message: "名称不能为空", trigger: "blur" }], type: [ - { required: true, message: "活动类型不能为空", trigger: "blur" } + { required: true, message: "活动类型不能为空", trigger: "blur" }, ], scope: [ - { required: true, message: "活动范围不能为空", trigger: "blur" } + { required: true, message: "活动范围不能为空", trigger: "blur" }, ], activitytime: [ - { required: true, message: "活动时间不能为空", trigger: "blur" } - ] - } + { required: true, message: "活动时间不能为空", trigger: "blur" }, + ], + }, }; }, created() { this.getList(); - this.getDicts("sys_schoolcalendartype").then(response => { + this.getDicts("sys_schoolcalendartype").then((response) => { this.schoolcalendartypeOptions = response.data; }); - this.getDicts("sys_yebjlx").then(response => { + this.getDicts("sys_yebjlx").then((response) => { this.scopeOptions = response.data; }); - this.getDicts("sys_xnxq").then(response => { + this.getDicts("sys_xnxq").then((response) => { this.xnxqOptions = response.data; }); }, @@ -394,7 +397,7 @@ export default { this.loading = true; listSchoolcalendar( this.addDateRange(this.queryParams, this.dateRange) - ).then(response => { + ).then((response) => { this.schoolcalendarList = response.rows; this.total = response.total; this.loading = false; @@ -412,7 +415,7 @@ export default { name: undefined, type: undefined, scope: undefined, - activitytime: undefined + activitytime: undefined, }; this.resetForm("form"); }, @@ -429,7 +432,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.id); + this.ids = selection.map((item) => item.id); this.single = selection.length != 1; this.multiple = !selection.length; }, @@ -444,7 +447,7 @@ export default { this.reset(); const id = row.id || this.ids; var myArray = new Array(2); - getSchoolcalendar(id).then(response => { + getSchoolcalendar(id).then((response) => { this.form = response.data; myArray[0] = response.data.activitytime; myArray[1] = response.data.activityendtime; @@ -457,8 +460,8 @@ export default { }); }, /** 提交按钮 */ - submitForm: function() { - this.$refs["form"].validate(valid => { + submitForm: function () { + this.$refs["form"].validate((valid) => { if (valid) { var arrscope = this.form.scope; this.form.scope = arrscope.join(";"); @@ -469,7 +472,7 @@ export default { this.form.activityendtime = v2; if (this.form.id != undefined) { - updateSchoolcalendar(this.form).then(response => { + updateSchoolcalendar(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("修改成功"); this.open = false; @@ -480,7 +483,7 @@ export default { }); } else { //console.log(this.form.activitytime[1]); - addSchoolcalendar(this.form).then(response => { + addSchoolcalendar(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("新增成功"); this.open = false; @@ -502,17 +505,17 @@ export default { { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", } ) - .then(function() { + .then(function () { return delSchoolcalendar(ids); }) .then(() => { this.getList(); this.msgSuccess("删除成功"); }) - .catch(function() {}); + .catch(function () {}); }, /** 导出按钮操作 */ handleExport() { @@ -520,16 +523,16 @@ export default { this.$confirm("是否确认导出所有园历管理数据项?", "警告", { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", }) - .then(function() { + .then(function () { return exportSchoolcalendar(queryParams); }) - .then(response => { + .then((response) => { this.download(response.msg); }) - .catch(function() {}); - } - } + .catch(function () {}); + }, + }, }; </script> diff --git a/ruoyi-ui/src/views/benyi/schoolcalendarclass/index.vue b/ruoyi-ui/src/views/benyi/schoolcalendarclass/index.vue index 67d6766bf..ad98c9949 100644 --- a/ruoyi-ui/src/views/benyi/schoolcalendarclass/index.vue +++ b/ruoyi-ui/src/views/benyi/schoolcalendarclass/index.vue @@ -1,8 +1,18 @@ <template> <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> + <el-form + :model="queryParams" + ref="queryForm" + :inline="true" + label-width="68px" + > <el-form-item label="活动类型" prop="type"> - <el-select v-model="queryParams.type" placeholder="请选择活动类型" clearable size="small"> + <el-select + v-model="queryParams.type" + placeholder="请选择活动类型" + clearable + size="small" + > <el-option v-for="dict in typeOptions" :key="dict.dictValue" @@ -22,7 +32,12 @@ </el-select> </el-form-item>--> <el-form-item label="学年学期" prop="xnxq"> - <el-select v-model="queryParams.xnxq" placeholder="请选择学年学期" clearable size="small"> + <el-select + v-model="queryParams.xnxq" + placeholder="请选择学年学期" + clearable + size="small" + > <el-option v-for="dict in xnxqOptions" :key="dict.dictValue" @@ -43,8 +58,16 @@ ></el-date-picker> </el-form-item> <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> + <el-button + type="primary" + icon="el-icon-search" + size="mini" + @click="handleQuery" + >搜索</el-button + > + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" + >重置</el-button + > </el-form-item> </el-form> @@ -56,7 +79,8 @@ size="mini" @click="handleAdd" v-hasPermi="['benyi:schoolcalendarclass:add']" - >新增</el-button> + >新增</el-button + > </el-col> <el-col :span="1.5"> <el-button @@ -66,7 +90,8 @@ :disabled="single" @click="handleUpdate" v-hasPermi="['benyi:schoolcalendarclass:edit']" - >修改</el-button> + >修改</el-button + > </el-col> <el-col :span="1.5"> <el-button @@ -76,7 +101,8 @@ :disabled="multiple" @click="handleDelete" v-hasPermi="['benyi:schoolcalendarclass:remove']" - >删除</el-button> + >删除</el-button + > </el-col> <el-col :span="1.5"> <el-button @@ -85,28 +111,60 @@ size="mini" @click="handleExport" v-hasPermi="['benyi:schoolcalendarclass:export']" - >导出</el-button> + >导出</el-button + > </el-col> </el-row> <el-table + border v-loading="loading" :data="schoolcalendarclassList" @selection-change="handleSelectionChange" > - <el-table-column type="selection" width="55" align="center" :selectable="checkSelectable" /> + <el-table-column + type="selection" + width="55" + align="center" + :selectable="checkSelectable" + /> <!-- <el-table-column label="编号" align="center" prop="id" /> --> - <el-table-column label="名称" align="center" prop="name" /> - <el-table-column label="活动类型" align="center" prop="type" :formatter="typeFormat" /> + <el-table-column fixed label="名称" align="center" prop="name" /> + <el-table-column + label="活动类型" + align="center" + prop="type" + :formatter="typeFormat" + /> <el-table-column label="所属班级" align="center" prop="byClass.bjmc" /> - <el-table-column label="学年学期" align="center" prop="xnxq" :formatter="xnxqFormat" /> - <el-table-column label="活动时间" align="center" prop="activitytime" width="180" /> - <el-table-column label="创建时间" align="center" prop="createtime" width="180"> + <el-table-column + label="学年学期" + align="center" + prop="xnxq" + :formatter="xnxqFormat" + /> + <el-table-column + label="活动时间" + align="center" + prop="activitytime" + width="180" + /> + <el-table-column + label="创建时间" + align="center" + prop="createtime" + width="180" + > <template slot-scope="scope"> <span>{{ parseTime(scope.row.createtime) }}</span> </template> </el-table-column> - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> + <el-table-column + fixed="right" + label="操作" + align="center" + class-name="small-padding fixed-width" + > <template slot-scope="scope"> <el-button size="mini" @@ -115,7 +173,8 @@ @click="handleUpdate(scope.row)" v-hasPermi="['benyi:schoolcalendarclass:edit']" :disabled="!checkSelectable(scope.row)" - >修改</el-button> + >修改</el-button + > <el-button size="mini" type="text" @@ -123,13 +182,14 @@ @click="handleDelete(scope.row)" v-hasPermi="['benyi:schoolcalendarclass:remove']" :disabled="!checkSelectable(scope.row)" - >删除</el-button> + >删除</el-button + > </template> </el-table-column> </el-table> <pagination - v-show="total>0" + v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @@ -140,7 +200,11 @@ <el-dialog :title="title" :visible.sync="open" width="500px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="名称" prop="name"> - <el-input v-model="form.name" type="textarea" placeholder="请输入内容" /> + <el-input + v-model="form.name" + type="textarea" + placeholder="请输入内容" + /> </el-form-item> <el-form-item label="活动类型" prop="type"> <el-select v-model="form.type" placeholder="请选择活动类型"> @@ -184,7 +248,7 @@ import { delSchoolcalendarclass, addSchoolcalendarclass, updateSchoolcalendarclass, - exportSchoolcalendarclass + exportSchoolcalendarclass, } from "@/api/benyi/schoolcalendarclass"; export default { @@ -219,7 +283,7 @@ export default { pickerOptions0: { disabledDate(time) { return time.getTime() < Date.now() - 8.64e7; - } + }, }, // 查询参数 queryParams: { @@ -232,7 +296,7 @@ export default { deptid: undefined, activitytime: undefined, createuserid: undefined, - createtime: undefined + createtime: undefined, }, // 表单参数 form: {}, @@ -241,21 +305,21 @@ export default { rules: { name: [{ required: true, message: "名称不能为空", trigger: "blur" }], type: [ - { required: true, message: "活动类型不能为空", trigger: "blur" } + { required: true, message: "活动类型不能为空", trigger: "blur" }, ], activitytime: [ - { required: true, message: "活动时间不能为空", trigger: "blur" } - ] - } + { required: true, message: "活动时间不能为空", trigger: "blur" }, + ], + }, }; }, created() { this.getList(); this.getListAll(); - this.getDicts("sys_schoolcalendartype").then(response => { + this.getDicts("sys_schoolcalendartype").then((response) => { this.typeOptions = response.data; }); - this.getDicts("sys_xnxq").then(response => { + this.getDicts("sys_xnxq").then((response) => { this.xnxqOptions = response.data; }); }, @@ -263,7 +327,7 @@ export default { /** 查询园历管理(班级)列表 */ getList() { this.loading = true; - listSchoolcalendarclass(this.queryParams).then(response => { + listSchoolcalendarclass(this.queryParams).then((response) => { this.schoolcalendarclassList = response.rows; this.total = response.total; this.loading = false; @@ -271,7 +335,7 @@ export default { }, /** 查询所有班级名称列表 */ getListAll() { - listSchoolcalendarclassAll(this.queryParams).then(response => { + listSchoolcalendarclassAll(this.queryParams).then((response) => { this.classListAll = response.rows; }); }, @@ -311,7 +375,7 @@ export default { deptid: undefined, activitytime: undefined, createuserid: undefined, - createtime: undefined + createtime: undefined, }; this.resetForm("form"); }, @@ -327,7 +391,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.id); + this.ids = selection.map((item) => item.id); this.single = selection.length != 1; this.multiple = !selection.length; }, @@ -342,7 +406,7 @@ export default { this.reset(); const id = row.id || this.ids; var myArray = new Array(2); - getSchoolcalendarclass(id).then(response => { + getSchoolcalendarclass(id).then((response) => { this.form = response.data; myArray[0] = response.data.activitytime; myArray[1] = response.data.activityendtime; @@ -353,8 +417,8 @@ export default { }); }, /** 提交按钮 */ - submitForm: function() { - this.$refs["form"].validate(valid => { + submitForm: function () { + this.$refs["form"].validate((valid) => { if (valid) { var v1 = this.form.activitytime[0]; var v2 = this.form.activitytime[1]; @@ -362,7 +426,7 @@ export default { this.form.activityendtime = v2; if (this.form.id != undefined) { - updateSchoolcalendarclass(this.form).then(response => { + updateSchoolcalendarclass(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("修改成功"); this.open = false; @@ -372,7 +436,7 @@ export default { } }); } else { - addSchoolcalendarclass(this.form).then(response => { + addSchoolcalendarclass(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("新增成功"); this.open = false; @@ -394,17 +458,17 @@ export default { { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", } ) - .then(function() { + .then(function () { return delSchoolcalendarclass(ids); }) .then(() => { this.getList(); this.msgSuccess("删除成功"); }) - .catch(function() {}); + .catch(function () {}); }, /** 导出按钮操作 */ handleExport() { @@ -412,16 +476,16 @@ export default { this.$confirm("是否确认导出所有园历管理(班级)数据项?", "警告", { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", }) - .then(function() { + .then(function () { return exportSchoolcalendarclass(queryParams); }) - .then(response => { + .then((response) => { this.download(response.msg); }) - .catch(function() {}); - } - } + .catch(function () {}); + }, + }, }; </script> \ No newline at end of file diff --git a/ruoyi-ui/src/views/system/class/index.vue b/ruoyi-ui/src/views/system/class/index.vue index ca5e3dd14..120747c6e 100644 --- a/ruoyi-ui/src/views/system/class/index.vue +++ b/ruoyi-ui/src/views/system/class/index.vue @@ -128,6 +128,7 @@ <el-table v-loading="loading" + border :data="classList" @selection-change="handleSelectionChange" > @@ -137,14 +138,14 @@ align="center" prop="bjbh" v-if="false" - />> + /> + <el-table-column fixed label="班级名称" align="center" prop="bjmc" /> <el-table-column label="班级类型" align="center" :formatter="bjtypeFormat" prop="bjtype" - /> - <el-table-column label="班级名称" align="center" prop="bjmc" /> + /> <el-table-column label="主班教师" align="center" prop="zbjsxm" /> <el-table-column label="配班教师" align="center" prop="pbjsxm" /> <el-table-column label="助理教师" align="center" prop="zljsxm" /> @@ -159,6 +160,7 @@ </template> </el-table-column> <el-table-column + fixed="right" label="操作" width="220" align="center" @@ -267,7 +269,7 @@ import { addClass, updateClass, exportClass, - delJsClass + delJsClass, } from "@/api/system/class"; import { getUsersByRoleId } from "@/api/system/user"; @@ -312,26 +314,28 @@ export default { zbjsxm: undefined, pbjsxm: undefined, zljsxm: undefined, - createtime: undefined + createtime: undefined, }, // 表单参数 form: {}, // 表单校验 rules: { bjtype: [ - { required: true, message: "班级类型不能为空", trigger: "blur" } + { required: true, message: "班级类型不能为空", trigger: "blur" }, ], - bjmc: [{ required: true, message: "班级名称不能为空", trigger: "blur" }] - } + bjmc: [ + { required: true, message: "班级名称不能为空", trigger: "blur" }, + ], + }, }; }, created() { this.getList(); - this.getDicts("sys_yebjlx").then(response => { + this.getDicts("sys_yebjlx").then((response) => { this.bjtypeOptions = response.data; }); //获取主班教师角色用户列表 - getUsersByRoleId().then(response => { + getUsersByRoleId().then((response) => { this.zbjsOptions = response.zbjs; this.pbjsOptions = response.pbjs; this.zljsOptions = response.zljs; @@ -341,7 +345,7 @@ export default { /** 查询班级信息列表 */ getList() { this.loading = true; - listClass(this.queryParams).then(response => { + listClass(this.queryParams).then((response) => { this.classList = response.rows; console.log(this.classList); this.total = response.total; @@ -367,7 +371,7 @@ export default { zbjs: undefined, pbjs: undefined, zljs: undefined, - createtime: undefined + createtime: undefined, }; this.resetForm("form"); }, @@ -383,7 +387,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.bjbh); + this.ids = selection.map((item) => item.bjbh); this.single = selection.length != 1; this.multiple = !selection.length; }, @@ -393,7 +397,7 @@ export default { this.open = true; this.title = "添加班级信息"; //获取主班教师角色用户列表 - getUsersByRoleId().then(response => { + getUsersByRoleId().then((response) => { this.zbjsOptions = response.zbjs; this.pbjsOptions = response.pbjs; this.zljsOptions = response.zljs; @@ -403,13 +407,13 @@ export default { handleUpdate(row) { this.reset(); const bjbh = row.bjbh || this.ids; - getClass(bjbh).then(response => { + getClass(bjbh).then((response) => { this.form = response.data; this.open = true; this.title = "修改班级信息"; //获取主班教师角色用户列表 - getUsersByRoleId().then(response => { + getUsersByRoleId().then((response) => { this.zbjsOptions = response.zbjs; this.pbjsOptions = response.pbjs; this.zljsOptions = response.zljs; @@ -417,11 +421,11 @@ export default { }); }, /** 提交按钮 */ - submitForm: function() { - this.$refs["form"].validate(valid => { + submitForm: function () { + this.$refs["form"].validate((valid) => { if (valid) { if (this.form.bjbh != undefined) { - updateClass(this.form).then(response => { + updateClass(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("修改成功"); this.open = false; @@ -431,7 +435,7 @@ export default { } }); } else { - addClass(this.form).then(response => { + addClass(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("新增成功"); this.open = false; @@ -450,32 +454,32 @@ export default { this.$confirm("是否确认删除选中的班级信息?", "警告", { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", }) - .then(function() { + .then(function () { return delClass(bjbhs); }) .then(() => { this.getList(); this.msgSuccess("删除成功"); }) - .catch(function() {}); + .catch(function () {}); }, handleEditJs(row) { const bjbhs = row.bjbh || this.ids; this.$confirm("是否确认清空选中的班级教师信息?", "警告", { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", }) - .then(function() { + .then(function () { return delJsClass(bjbhs); }) .then(() => { this.getList(); this.msgSuccess("清空成功"); }) - .catch(function() {}); + .catch(function () {}); }, /** 导出按钮操作 */ handleExport() { @@ -483,16 +487,16 @@ export default { this.$confirm("是否确认导出所有班级信息数据项?", "警告", { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", }) - .then(function() { + .then(function () { return exportClass(queryParams); }) - .then(response => { + .then((response) => { this.download(response.msg); }) - .catch(function() {}); - } - } + .catch(function () {}); + }, + }, }; </script> diff --git a/ruoyi-ui/src/views/system/teacher/index.vue b/ruoyi-ui/src/views/system/teacher/index.vue index 715d6c6ef..c38f4ec18 100644 --- a/ruoyi-ui/src/views/system/teacher/index.vue +++ b/ruoyi-ui/src/views/system/teacher/index.vue @@ -89,11 +89,17 @@ <el-table v-loading="loading" + border :data="teacherList" @selection-change="handleSelectionChange" > <el-table-column type="selection" width="55" align="center" /> - <el-table-column label="用户名称" align="center" prop="user.nickName" /> + <el-table-column + fixed + label="用户名称" + align="center" + prop="user.nickName" + /> <el-table-column label="出生日期" align="center" @@ -130,6 +136,7 @@ <el-table-column label="资格证书" align="center" prop="zgzs" :formatter="zgzsFormat" /> <el-table-column label="创建人" align="center" prop="createuserid" />--> <el-table-column + fixed="right" label="操作" align="center" width="200" @@ -139,7 +146,7 @@ <el-button size="mini" type="text" - icon="el-icon-edit" + icon="el-icon-view" @click="handleDetail(scope.row)" v-hasPermi="['system:teacher:edit']" >详情</el-button @@ -249,7 +256,9 @@ </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">确 定</el-button> + <el-button type="primary" v-show="!flag" @click="submitForm" + >确 定</el-button + > <el-button @click="cancel">取 消</el-button> </div> </el-dialog> @@ -264,7 +273,7 @@ import { delTeacher, addTeacher, updateTeacher, - exportTeacher + exportTeacher, } from "@/api/system/teacher"; export default { @@ -301,7 +310,7 @@ export default { pickerOptions0: { disabledDate(time) { return time.getTime() > Date.now() - 8.64e7; - } + }, }, //修改和查看详情的标志 当查看详情时不允许编辑页面 flag: "", @@ -319,7 +328,7 @@ export default { cjgzrq: undefined, zgzs: undefined, createuserid: undefined, - createtime: undefined + createtime: undefined, }, // 表单参数 form: {}, @@ -330,22 +339,22 @@ export default { required: false, pattern: /^\d{18}$/, message: "请输入正确的身份证号", - trigger: "blur" - } - ] - } + trigger: "blur", + }, + ], + }, }; }, created() { this.getList(); this.getList2(); - this.getDicts("sys_jsxl").then(response => { + this.getDicts("sys_jsxl").then((response) => { this.xlOptions = response.data; }); - this.getDicts("sys_jsxw").then(response => { + this.getDicts("sys_jsxw").then((response) => { this.xwOptions = response.data; }); - this.getDicts("sys_jszgzs").then(response => { + this.getDicts("sys_jszgzs").then((response) => { this.zgzsOptions = response.data; }); }, @@ -353,7 +362,7 @@ export default { /** 查询教师基本信息列表 */ getList() { this.loading = true; - listTeacher(this.queryParams).then(response => { + listTeacher(this.queryParams).then((response) => { this.teacherList = response.rows; console.log(response); this.total = response.total; @@ -361,7 +370,7 @@ export default { }); }, getList2() { - listTeacher2(this.queryParams).then(response => { + listTeacher2(this.queryParams).then((response) => { this.teacherListAll = response.rows; }); }, @@ -397,7 +406,7 @@ export default { cjgzrq: undefined, zgzs: undefined, createuserid: undefined, - createtime: undefined + createtime: undefined, }; this.resetForm("form"); }, @@ -413,7 +422,7 @@ export default { }, // 多选框选中数据 handleSelectionChange(selection) { - this.ids = selection.map(item => item.id); + this.ids = selection.map((item) => item.id); this.single = selection.length != 1; this.multiple = !selection.length; }, @@ -427,7 +436,7 @@ export default { handleUpdate(row) { this.reset(); const id = row.id || this.ids; - getTeacher(id).then(response => { + getTeacher(id).then((response) => { this.form = response.data; this.teacherMingCheng = this.form.user.nickName; this.open = true; @@ -439,7 +448,7 @@ export default { handleDetail(row) { this.reset(); const id = row.id; - getTeacher(id).then(response => { + getTeacher(id).then((response) => { this.form = response.data; this.teacherMingCheng = this.form.user.nickName; this.open = true; @@ -449,11 +458,11 @@ export default { }); }, /** 提交按钮 */ - submitForm: function() { - this.$refs["form"].validate(valid => { + submitForm: function () { + this.$refs["form"].validate((valid) => { if (valid) { if (this.form.id != undefined) { - updateTeacher(this.form).then(response => { + updateTeacher(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("修改成功"); this.open = false; @@ -463,7 +472,7 @@ export default { } }); } else { - addTeacher(this.form).then(response => { + addTeacher(this.form).then((response) => { if (response.code === 200) { this.msgSuccess("新增成功"); this.open = false; @@ -485,17 +494,17 @@ export default { { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", } ) - .then(function() { + .then(function () { return delTeacher(ids); }) .then(() => { this.getList(); this.msgSuccess("删除成功"); }) - .catch(function() {}); + .catch(function () {}); }, /** 导出按钮操作 */ handleExport() { @@ -503,16 +512,16 @@ export default { this.$confirm("是否确认导出所有教师基本信息数据项?", "警告", { confirmButtonText: "确定", cancelButtonText: "取消", - type: "warning" + type: "warning", }) - .then(function() { + .then(function () { return exportTeacher(queryParams); }) - .then(response => { + .then((response) => { this.download(response.msg); }) - .catch(function() {}); - } - } + .catch(function () {}); + }, + }, }; </script>