master
王家东 2 weeks ago
parent eb4ce26c3e
commit bee5dbbbf8
  1. 35
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java
  2. 2
      jeecgboot-vue3/src/views/expert/adminback/Expert.api.ts
  3. 6
      jeecgboot-vue3/src/views/expert/adminback/Expert.data.ts

@ -457,6 +457,41 @@ public class ExpertController extends JeecgController<Expert, IExpertService> {
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
/**
* 编辑
*
* @param expert
* @return
*/
@AutoLog(value = "专家管理(市局管理员)-编辑")
@ApiOperation(value="专家管理(市局管理员)-编辑", notes="专家管理(市局管理员)-编辑")
@RequestMapping(value = "/editstatic", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> editstatic(@RequestBody Expert expert) {
if (expert.getExpsture().equals("N")) {
expert.setErrinfo("");
}
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("编辑成功!");
}
/** /**
* 编辑 * 编辑
* *

@ -6,7 +6,7 @@ const { createConfirm } = useMessage();
enum Api { enum Api {
list = '/expert/expert/listadminstatic', list = '/expert/expert/listadminstatic',
save='/expert/expert/add', save='/expert/expert/add',
edit='/expert/expert/edit', edit='/expert/expert/editstatic',
deleteOne = '/expert/expert/delete', deleteOne = '/expert/expert/delete',
deleteBatch = '/expert/expert/deleteBatch', deleteBatch = '/expert/expert/deleteBatch',
importExcel = '/expert/expert/importExcel', importExcel = '/expert/expert/importExcel',

@ -76,6 +76,12 @@ export const columns: BasicColumn[] = [
return render.renderSwitch(text, [{text:'正常',value:'N'},{text:'异常',value:'Y'}]); return render.renderSwitch(text, [{text:'正常',value:'N'},{text:'异常',value:'Y'}]);
}, },
}, },
{
title: '异常原因',
align: "center",
dataIndex: 'errinfo_dictText'
},
]; ];
// //

Loading…
Cancel
Save