diff --git a/jeecg-boot/jeecg-module-demo/pom.xml b/jeecg-boot/jeecg-module-demo/pom.xml index 5f3119f..86b18a2 100644 --- a/jeecg-boot/jeecg-module-demo/pom.xml +++ b/jeecg-boot/jeecg-module-demo/pom.xml @@ -16,6 +16,10 @@ org.jeecgframework.boot jeecg-boot-base-core + + org.jeecgframework.boot + jeecg-system-biz + - \ No newline at end of file + 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 new file mode 100644 index 0000000..5e729fb --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/controller/ExpertController.java @@ -0,0 +1,220 @@ +package org.jeecg.modules.demo.expert.controller; + +import java.util.*; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.constant.CommonConstant; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.common.util.PasswordUtil; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.expert.entity.Expert; +import org.jeecg.modules.demo.expert.service.IExpertService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecg.modules.system.entity.SysUser; +import org.jeecg.modules.system.service.ISysUserService; +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.apache.shiro.authz.annotation.RequiresPermissions; + + /** + * @Description: 专家管理 + * @Author: jeecg-boot + * @Date: 2024-09-29 + * @Version: V1.0 + */ +@Api(tags="专家管理") +@RestController +@RequestMapping("/expert/expert") +@Slf4j +public class ExpertController extends JeecgController { + @Autowired + private IExpertService expertService; + @Autowired + private ISysUserService sysUserService; + + /** + * 分页列表查询 + * + * @param expert + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "专家管理-分页列表查询") + @ApiOperation(value="专家管理-分页列表查询", notes="专家管理-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Expert expert, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expert, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = expertService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param expert + * @return + */ + @AutoLog(value = "专家管理-添加") + @ApiOperation(value="专家管理-添加", notes="专家管理-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody Expert expert) { + //先判断两个密码是否相同 + if (!expert.getPsd().equals(expert.getSepsd())){ + return Result.OK().error500("两次输入的密码不同"); + } + //判断是用户名是否存在 + String isusername = expertService.isusername(expert.getSeusername()); + if(isusername.equals("1")){ + Result.OK().error500("当前的用户名已经存在"); + } + //判断工号是否存在 + String isworkon =expertService.isworkon(expert.getWorkon()); + if (isworkon.equals("1")){ + Result.OK().error500("当前的工号已经存在"); + } + //判断电话号码是否存在 + String isphone = expertService.isphone(expert.getPhone()); + if (isphone.equals("1")){ + Result.OK().error500("当前的电话号码已经存在"); + } + //判断电子邮件是否存在 + String isemils = expertService.isemils(expert.getEmails()); + if (isemils.equals("1")){ + Result.OK().error500("当前的电子邮件已经存在"); + } + + //开始添加到用户表 + 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.saveUser(user, "1843478958968647681", expert.getSsdep(), ""); + expertService.save(expert); + // + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param expert + * @return + */ + @AutoLog(value = "专家管理-编辑") + @ApiOperation(value="专家管理-编辑", notes="专家管理-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Expert expert) { + expertService.updateById(expert); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "专家管理-通过id删除") + @ApiOperation(value="专家管理-通过id删除", notes="专家管理-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + expertService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "专家管理-批量删除") + @ApiOperation(value="专家管理-批量删除", notes="专家管理-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.expertService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "专家管理-通过id查询") + @ApiOperation(value="专家管理-通过id查询", notes="专家管理-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Expert expert = expertService.getById(id); + if(expert==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(expert); + } + + /** + * 导出excel + * + * @param request + * @param expert + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Expert expert) { + return super.exportXls(request, expert, Expert.class, "专家管理"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Expert.class); + } + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/Expert.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/Expert.java new file mode 100644 index 0000000..4b8574e --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/entity/Expert.java @@ -0,0 +1,113 @@ +package org.jeecg.modules.demo.expert.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.*; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 专家管理 + * @Author: jeecg-boot + * @Date: 2024-09-29 + * @Version: V1.0 + */ +@Data +@TableName("expert") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="expert对象", description="专家管理") +public class Expert implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + /**用户名*/ + @Excel(name = "用户名", width = 15) + @ApiModelProperty(value = "用户名") + private String seusername; + /**毕业院校*/ + @Excel(name = "毕业院校", width = 15) + @ApiModelProperty(value = "毕业院校") + private String colleges; + /**专业*/ + @Excel(name = "专业", width = 15) + @ApiModelProperty(value = "专业") + private String major; + /**研究方向*/ + @Excel(name = "研究方向", width = 15) + @ApiModelProperty(value = "研究方向") + private String directioncal; + /**研究类型*/ + @Excel(name = "研究类型", width = 15) + @ApiModelProperty(value = "研究类型") + private String research; + /**学历*/ + @Excel(name = "学历", width = 15) + @ApiModelProperty(value = "学历") + private String educationcal; + /**专家简介*/ + @Excel(name = "专家简介", width = 15) + @ApiModelProperty(value = "专家简介") + private String expinfo; + /**部门审核*/ + @Excel(name = "部门审核", width = 15,replace = {"是_Y","否_N"} ) + @ApiModelProperty(value = "部门审核") + private String compopen; + /**管理员审核*/ + @Excel(name = "管理员审核", width = 15,replace = {"是_Y","否_N"} ) + @ApiModelProperty(value = "管理员审核") + private String adminopen; + + @TableField(exist = false) + private String psd; + @TableField(exist = false) + private String sepsd; + @TableField(exist = false) + private String realname; + @TableField(exist = false) + private String workon; + @TableField(exist = false) + private String ssdep; + @TableField(exist = false) + private String topPic; + @TableField(exist = false) + private String phone; + @TableField(exist = false) + private String emails; + @TableField(exist = false) + private Integer sex; +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java new file mode 100644 index 0000000..9cc41d1 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/ExpertMapper.java @@ -0,0 +1,29 @@ +package org.jeecg.modules.demo.expert.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.jeecg.modules.demo.expert.entity.Expert; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 专家管理 + * @Author: jeecg-boot + * @Date: 2024-09-29 + * @Version: V1.0 + */ +public interface ExpertMapper extends BaseMapper { + + @Select("SELECT COUNT(*) FROM sys_user WHERE username =#{seusername}") + String isusername(String seusername); + + @Select("SELECT COUNT(*) FROM sys_user WHERE work_no =#{workon}") + String isworkon(String workon); + + @Select("SELECT COUNT(*) FROM sys_user WHERE phone =#{phone}") + String isphone(String phone); + + @Select("SELECT COUNT(*) FROM sys_user WHERE email =#{emails}") + String isemils(String emails); +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/xml/ExpertMapper.xml b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/xml/ExpertMapper.xml new file mode 100644 index 0000000..766e77a --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/mapper/xml/ExpertMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/IExpertService.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/IExpertService.java new file mode 100644 index 0000000..6f3b5c7 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/IExpertService.java @@ -0,0 +1,21 @@ +package org.jeecg.modules.demo.expert.service; + +import org.jeecg.modules.demo.expert.entity.Expert; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 专家管理 + * @Author: jeecg-boot + * @Date: 2024-09-29 + * @Version: V1.0 + */ +public interface IExpertService extends IService { + + String isusername(String seusername); + + String isworkon(String workon); + + String isphone(String phone); + + String isemils(String emails); +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java new file mode 100644 index 0000000..a05588a --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expert/service/impl/ExpertServiceImpl.java @@ -0,0 +1,43 @@ +package org.jeecg.modules.demo.expert.service.impl; + +import org.jeecg.modules.demo.expert.entity.Expert; +import org.jeecg.modules.demo.expert.mapper.ExpertMapper; +import org.jeecg.modules.demo.expert.service.IExpertService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 专家管理 + * @Author: jeecg-boot + * @Date: 2024-09-29 + * @Version: V1.0 + */ +@Service +public class ExpertServiceImpl extends ServiceImpl implements IExpertService { + + @Autowired + private ExpertMapper expertMapper; + + + @Override + public String isusername(String seusername) { + return expertMapper.isusername(seusername); + } + + @Override + public String isworkon(String workon) { + return expertMapper.isworkon(workon); + } + + @Override + public String isphone(String phone) { + return expertMapper.isphone(phone); + } + + @Override + public String isemils(String emails) { + return expertMapper.isemils(emails); + } +} diff --git a/jeecgboot-vue3/src/views/expert/Expert.api.ts b/jeecgboot-vue3/src/views/expert/Expert.api.ts new file mode 100644 index 0000000..4df1f72 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/Expert.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/expert/expert/list', + save='/expert/expert/add', + edit='/expert/expert/edit', + deleteOne = '/expert/expert/delete', + deleteBatch = '/expert/expert/deleteBatch', + importExcel = '/expert/expert/importExcel', + exportXls = '/expert/expert/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/jeecgboot-vue3/src/views/expert/Expert.data.ts b/jeecgboot-vue3/src/views/expert/Expert.data.ts new file mode 100644 index 0000000..368c16e --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/Expert.data.ts @@ -0,0 +1,72 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '用户名', + align: "center", + dataIndex: 'seusername' + }, + { + title: '毕业院校', + align: "center", + dataIndex: 'colleges' + }, + { + title: '专业', + align: "center", + dataIndex: 'major' + }, + { + title: '研究方向', + align: "center", + dataIndex: 'directioncal' + }, + { + title: '研究类型', + align: "center", + dataIndex: 'research' + }, + { + title: '学历', + align: "center", + dataIndex: 'educationcal' + }, + { + title: '专家简介', + align: "center", + dataIndex: 'expinfo' + }, + { + title: '部门审核', + align: "center", + dataIndex: 'compopen', + customRender:({text}) => { + return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]); + }, + }, + { + title: '管理员审核', + align: "center", + dataIndex: 'adminopen', + customRender:({text}) => { + return render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]); + }, + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + seusername: {title: '用户名',order: 0,view: 'text', type: 'string',}, + colleges: {title: '毕业院校',order: 1,view: 'text', type: 'string',}, + major: {title: '专业',order: 2,view: 'text', type: 'string',}, + directioncal: {title: '研究方向',order: 3,view: 'text', type: 'string',}, + research: {title: '研究类型',order: 4,view: 'text', type: 'string',}, + educationcal: {title: '学历',order: 5,view: 'text', type: 'string',}, + expinfo: {title: '专家简介',order: 6,view: 'text', type: 'string',}, + compopen: {title: '部门审核',order: 7,view: 'switch', type: 'string',}, + adminopen: {title: '管理员审核',order: 8,view: 'switch', type: 'string',}, +}; diff --git a/jeecgboot-vue3/src/views/expert/ExpertList.vue b/jeecgboot-vue3/src/views/expert/ExpertList.vue new file mode 100644 index 0000000..ca6903e --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/ExpertList.vue @@ -0,0 +1,269 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/expert/V20240926_1__menu_insert_Expert.sql b/jeecgboot-vue3/src/views/expert/V20240926_1__menu_insert_Expert.sql new file mode 100644 index 0000000..6883600 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/V20240926_1__menu_insert_Expert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/expert文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2024092603239210260', NULL, '专家管理', '/expert/expertList', 'expert/ExpertList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092603239210261', '2024092603239210260', '添加专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092603239210262', '2024092603239210260', '编辑专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092603239210263', '2024092603239210260', '删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092603239210264', '2024092603239210260', '批量删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092603239210265', '2024092603239210260', '导出excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092603239210266', '2024092603239210260', '导入excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-26 15:23:26', NULL, NULL, 0, 0, '1', 0); diff --git a/jeecgboot-vue3/src/views/expert/V20240929_1__menu_insert_Expert.sql b/jeecgboot-vue3/src/views/expert/V20240929_1__menu_insert_Expert.sql new file mode 100644 index 0000000..57c53ae --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/V20240929_1__menu_insert_Expert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/expert文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2024092910425270310', NULL, '专家管理', '/expert/expertList', 'expert/ExpertList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092910425270311', '2024092910425270310', '添加专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092910425270312', '2024092910425270310', '编辑专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092910425270313', '2024092910425270310', '删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092910425270314', '2024092910425270310', '批量删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092910425270315', '2024092910425270310', '导出excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024092910425270316', '2024092910425270310', '导入excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-29 10:42:31', NULL, NULL, 0, 0, '1', 0); diff --git a/jeecgboot-vue3/src/views/expert/V20240930_1__menu_insert_Expert.sql b/jeecgboot-vue3/src/views/expert/V20240930_1__menu_insert_Expert.sql new file mode 100644 index 0000000..f5859e1 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/V20240930_1__menu_insert_Expert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/expert文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2024093009506560560', NULL, '专家管理', '/expert/expertList', 'expert/ExpertList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024093009506560561', '2024093009506560560', '添加专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024093009506560562', '2024093009506560560', '编辑专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024093009506560563', '2024093009506560560', '删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024093009506560564', '2024093009506560560', '批量删除专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024093009506560565', '2024093009506560560', '导出excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024093009506560566', '2024093009506560560', '导入excel_专家管理', NULL, NULL, 0, NULL, NULL, 2, 'expert:expert:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-09-30 09:50:56', NULL, NULL, 0, 0, '1', 0); diff --git a/jeecgboot-vue3/src/views/expert/components/ExpertForm.vue b/jeecgboot-vue3/src/views/expert/components/ExpertForm.vue new file mode 100644 index 0000000..07b9362 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/components/ExpertForm.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/expert/components/ExpertModal.vue b/jeecgboot-vue3/src/views/expert/components/ExpertModal.vue new file mode 100644 index 0000000..b0942a5 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/components/ExpertModal.vue @@ -0,0 +1,77 @@ + + + + + +