From ec7f9e81ed3ffd05f54927d6f8d7b92e3716914b Mon Sep 17 00:00:00 2001 From: zhanglipeng Date: Wed, 18 Nov 2020 17:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/benyi/assessment/index.vue | 16 +- .../src/views/benyi/checkindetail/index.vue | 94 ++++++----- ruoyi-ui/src/views/benyi/child/index.vue | 138 ++++++++------- .../src/views/benyi/contactpeople/index.vue | 1 + .../src/views/benyi/schoolcalendar/index.vue | 75 +++++---- .../views/benyi/schoolcalendarclass/index.vue | 158 ++++++++++++------ ruoyi-ui/src/views/system/class/index.vue | 68 ++++---- ruoyi-ui/src/views/system/teacher/index.vue | 73 ++++---- 8 files changed, 362 insertions(+), 261 deletions(-) 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 @@ - - + + 新增 修改 + type="success" + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['benyi:checkindetail:edit']" + >修改 + + - - - + 全选 -
+
{ + 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; - } - } + }, + }, }; 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 @@ >新增
修改 + type="success" + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['benyi:child:edit']" + >修改 + - - + - + @@ -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(); - } - } + }, + }, }; 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 @@ 新增 修改 + type="success" + icon="el-icon-edit" + size="mini" + :disabled="single" + @click="handleUpdate" + v-hasPermi="['benyi:schoolcalendar:edit']" + >修改 - + { + 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 () {}); + }, + }, }; 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 @@ { + 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 () {}); + }, + }, }; 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 @@ - + --> 详情 @@ -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 () {}); + }, + }, };