From d798e2d8091c7b6222fe375bf5369b35ba425b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Sun, 27 Oct 2024 15:47:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=93=E5=AE=B6=E9=A1=B9=E7=9B=AE/=E4=B8=93?= =?UTF-8?q?=E5=AE=B6BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../expert/controller/ExpertController.java | 34 +++++++++++++++++++ .../src/views/expert/self/Expert.api.ts | 2 +- .../src/views/expert/self/ExpertList.vue | 4 +-- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java index 183196a..f4d90c5 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java @@ -400,6 +400,40 @@ public class ExpertController extends JeecgController { return Result.OK("编辑成功!"); } + /** + * 编辑 + * + * @param expert + * @return + */ + @AutoLog(value = "专家管理(专家自己)-编辑") + @ApiOperation(value="专家管理(专家自己)-编辑", notes="专家管理(专家自己)-编辑") + @RequestMapping(value = "/editself", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result editself(@RequestBody Expert expert) { + expert.setAdminopen("1"); + expert.setIsdone("Y"); + expert.setCompopen("1"); + expertService.updateById(expert); + //开始添加到用户表 + SysUser user = new SysUser(); + user.setAvatar(expert.getTopPic()); + user.setSex(expert.getSex()); + user.setRealname(expert.getRealname()); + user.setUsername(expert.getSeusername()); + user.setWorkNo(expert.getWorkon()); + user.setEmail(expert.getEmails()); + user.setPhone(expert.getPhone()); + user.setCreateTime(new Date());//设置创建时间 + String salt = oConvertUtils.randomGen(8); + user.setSalt(salt); + String passwordEncode = PasswordUtil.encrypt(expert.getSeusername(), expert.getPsd(), salt); + user.setPassword(passwordEncode); + user.setStatus(1); + user.setDelFlag(CommonConstant.DEL_FLAG_0); + sysUserService.editUser(user,"1843478958968647681", expert.getSsdep(), "", ""); + return Result.OK("编辑成功!"); + } + /** * 通过id删除 * diff --git a/jeecgboot-vue3/src/views/expert/self/Expert.api.ts b/jeecgboot-vue3/src/views/expert/self/Expert.api.ts index adfd2bb..0b81125 100644 --- a/jeecgboot-vue3/src/views/expert/self/Expert.api.ts +++ b/jeecgboot-vue3/src/views/expert/self/Expert.api.ts @@ -6,7 +6,7 @@ const { createConfirm } = useMessage(); enum Api { list = '/expert/expert/listself', save='/expert/expert/add', - edit='/expert/expert/edit', + edit='/expert/expert/editself', deleteOne = '/expert/expert/delete', deleteBatch = '/expert/expert/deleteBatch', importExcel = '/expert/expert/importExcel', diff --git a/jeecgboot-vue3/src/views/expert/self/ExpertList.vue b/jeecgboot-vue3/src/views/expert/self/ExpertList.vue index cf8edea..6213bbd 100644 --- a/jeecgboot-vue3/src/views/expert/self/ExpertList.vue +++ b/jeecgboot-vue3/src/views/expert/self/ExpertList.vue @@ -215,14 +215,14 @@ { label: '详情', onClick: handleDetail.bind(null, record), - }, { + }/*, { label: '删除', popConfirm: { title: '是否确认删除', confirm: handleDelete.bind(null, record), placement: 'topLeft', }, - }, { + }*/, { label: '上报审核', popConfirm: { title: '请确定信息已完善',