diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java index 9420958..7ccdf64 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/expproject/controller/ExpprojectController.java @@ -88,6 +88,47 @@ public class ExpprojectController { return Result.OK(pageList); } + + /** + * 分页列表查询 + * + * @param expproject + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "专家项目表-分页列表查询") + @ApiOperation(value="专家项目表-分页列表查询专家", notes="专家项目表-分页列表专家") + @GetMapping(value = "/listself") + public Result> listself(Expproject expproject, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(expproject, req.getParameterMap()); + //获取当前登录 + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + System.out.println(sysUser.getUsername()); + Expert expert = expertService.query().eq("seusername",sysUser.getUsername()).one(); + System.out.println(expert.getId()); + List expandproList = expandproService.query().eq("expid",expert.getSeusername()).list(); + List expprojectidlist = new ArrayList<>(); + // 遍历expandproList并提取expprojectid + for (Expandpro expandpro : expandproList) { + String expprojectid = expandpro.getExpprojectid(); + expprojectidlist.add(expprojectid); + } + if (expprojectidlist.size()>0) { + queryWrapper.in("id", expprojectidlist); + Page page = new Page(pageNo, pageSize); + IPage pageList = expprojectService.page(page, queryWrapper); + return Result.OK(pageList); + } else { + return Result.error("未发现数据"); + } + + } + /** * 添加 * diff --git a/jeecgboot-vue3/src/views/expert/selfback/Expert.api.ts b/jeecgboot-vue3/src/views/expert/selfback/Expert.api.ts new file mode 100644 index 0000000..0b81125 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/selfback/Expert.api.ts @@ -0,0 +1,81 @@ +import { defHttp } from '/src/utils/http/axios'; +import { useMessage } from "/src/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/expert/expert/listself', + save='/expert/expert/add', + edit='/expert/expert/editself', + deleteOne = '/expert/expert/delete', + deleteBatch = '/expert/expert/deleteBatch', + importExcel = '/expert/expert/importExcel', + exportXls = '/expert/expert/exportXls', + handleupAPI = '/expert/expert/handleup' +} + +/** + * 导出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 handleupAPI = (params) => defHttp.get({ url: Api.handleupAPI, params }); + +/** + * 批量删除 + * @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/selfback/Expert.data.ts b/jeecgboot-vue3/src/views/expert/selfback/Expert.data.ts new file mode 100644 index 0000000..d650278 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/selfback/Expert.data.ts @@ -0,0 +1,79 @@ +import {BasicColumn} from '/src/components/Table'; +import {FormSchema} from '/src/components/Table'; +import { rules} from '/src/utils/helper/validator'; +import { render } from '/src/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/src/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_dictText' + }, + { + title: '研究类型', + align: "center", + dataIndex: 'research' + }, + { + title: '学历', + align: "center", + dataIndex: 'educationcal' + }, + { + title: '专家简介', + align: "center", + dataIndex: 'expinfo' + }, + { + title: '部门审核', + align: "center", + dataIndex: 'compopen_dictText', + }, + { + title: '管理员审核', + align: "center", + dataIndex: 'adminopen_dictText', + }, + { + title: '管理员审核', + align: "center", + dataIndex: 'adminopen_dictText', + }, + { + title: '专家状态', + align: "center", + dataIndex: 'expsture', + 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/selfback/ExpertList.vue b/jeecgboot-vue3/src/views/expert/selfback/ExpertList.vue new file mode 100644 index 0000000..6213bbd --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/selfback/ExpertList.vue @@ -0,0 +1,282 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/expert/selfback/V20240926_1__menu_insert_Expert.sql b/jeecgboot-vue3/src/views/expert/selfback/V20240926_1__menu_insert_Expert.sql new file mode 100644 index 0000000..6883600 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/selfback/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/selfback/V20240929_1__menu_insert_Expert.sql b/jeecgboot-vue3/src/views/expert/selfback/V20240929_1__menu_insert_Expert.sql new file mode 100644 index 0000000..57c53ae --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/selfback/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/selfback/V20240930_1__menu_insert_Expert.sql b/jeecgboot-vue3/src/views/expert/selfback/V20240930_1__menu_insert_Expert.sql new file mode 100644 index 0000000..f5859e1 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/selfback/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/selfback/components/ExpertForm.vue b/jeecgboot-vue3/src/views/expert/selfback/components/ExpertForm.vue new file mode 100644 index 0000000..760b265 --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/selfback/components/ExpertForm.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/expert/selfback/components/ExpertModal.vue b/jeecgboot-vue3/src/views/expert/selfback/components/ExpertModal.vue new file mode 100644 index 0000000..9c03def --- /dev/null +++ b/jeecgboot-vue3/src/views/expert/selfback/components/ExpertModal.vue @@ -0,0 +1,77 @@ + + + + + + diff --git a/jeecgboot-vue3/src/views/expproject/admin/Expproject.data.ts b/jeecgboot-vue3/src/views/expproject/admin/Expproject.data.ts index cfcc7ed..06efff5 100644 --- a/jeecgboot-vue3/src/views/expproject/admin/Expproject.data.ts +++ b/jeecgboot-vue3/src/views/expproject/admin/Expproject.data.ts @@ -35,14 +35,14 @@ export const expandproColumns: JVxeColumn[] = [ key: 'expname', type: JVxeTypes.popup, popupCode:"findexp", - fieldConfig: [ - { source: 'id', target: 'expid' }, - { source: 'realname', target: 'expname' }, - { source: 'directioncal', target: 'exptype' }, - { source: 'depid', target: 'ssdep' }, - { source: 'phone', target: 'phone' }, - { source: 'email', target: 'emil' }, - ], + fieldConfig: [ + { source: 'username', target: 'expid' }, + { source: 'realname', target: 'expname' }, + { source: 'fdid', target: 'exptype' }, + { source: 'sysduid', target: 'ssdep' }, + { source: 'phone', target: 'phone' }, + { source: 'email', target: 'emil' }, + ], width:"200px", placeholder: '请输入${title}', @@ -57,7 +57,7 @@ export const expandproColumns: JVxeColumn[] = [ placeholder: '请输入${title}', defaultValue:'', }, - { + /*{ title: '所属单位', key: 'ssdep', type: JVxeTypes.selectSearch, @@ -65,7 +65,7 @@ export const expandproColumns: JVxeColumn[] = [ width:"200px", placeholder: '请输入${title}', defaultValue:'', - }, + },*/ { title: '专家电话', key: 'phone', diff --git a/jeecgboot-vue3/src/views/expproject/self/Expproject.api.ts b/jeecgboot-vue3/src/views/expproject/self/Expproject.api.ts new file mode 100644 index 0000000..1343a91 --- /dev/null +++ b/jeecgboot-vue3/src/views/expproject/self/Expproject.api.ts @@ -0,0 +1,87 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/expproject/expproject/listself', + save='/expproject/expproject/add', + edit='/expproject/expproject/edit', + deleteOne = '/expproject/expproject/delete', + deleteBatch = '/expproject/expproject/deleteBatch', + importExcel = '/expproject/expproject/importExcel', + exportXls = '/expproject/expproject/exportXls', + queryDataById = '/expproject/expproject/queryById', + expandproList = '/expproject/expproject/queryExpandproByMainId', + createexpawaitup= '/expproject/expproject/createexpawait', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 查询子表数据 + * @param params + */ +export const queryExpandproListByMainId = (id) => defHttp.get({url: Api.expandproList, params:{ id }}); + +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 随机生成专家接口 + * @param params + */ +export const createexpawait = (params) => defHttp.get({url: Api.createexpawaitup, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +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 + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} + +/** +* 根据id查询数据 +* @param params +*/ +export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }}); diff --git a/jeecgboot-vue3/src/views/expproject/self/Expproject.data.ts b/jeecgboot-vue3/src/views/expproject/self/Expproject.data.ts new file mode 100644 index 0000000..6ef71d2 --- /dev/null +++ b/jeecgboot-vue3/src/views/expproject/self/Expproject.data.ts @@ -0,0 +1,105 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types' +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '专家类型', + align:"center", + dataIndex: 'exptype_dictText' + }, + { + title: '需要专家个数', + align:"center", + dataIndex: 'needexp' + }, + { + title: '简介', + align:"center", + dataIndex: 'proinfo' + }, + { + title: '附件', + align:"center", + dataIndex: 'profile', + }, +]; + +//子表表格配置 +export const expandproColumns: JVxeColumn[] = [ + { + title: '专家名称', + key: 'expname', + type: JVxeTypes.popup, + popupCode:"findexp", + fieldConfig: [ + { source: 'username', target: 'expid' }, + { source: 'realname', target: 'expname' }, + { source: 'fdid', target: 'exptype' }, + { source: 'sysduid', target: 'ssdep' }, + { source: 'phone', target: 'phone' }, + { source: 'email', target: 'emil' }, + ], + + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '所属领域', + key: 'exptype', + type: JVxeTypes.input, + disabled:true, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, +/* { + title: '所属单位', + key: 'ssdep', + type: JVxeTypes.selectSearch, + dictCode:"sys_depart,depart_name,id", + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + },*/ + { + title: '专家电话', + key: 'phone', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + { + title: '专家邮箱', + key: 'emil', + type: JVxeTypes.input, + width:"200px", + placeholder: '请输入${title}', + defaultValue:'', + }, + ] + +// 高级查询数据 +export const superQuerySchema = { + exptype: {title: '专家类型',order: 1,view: 'sel_search', type: 'string',dictTable: "discipline_fieid", dictCode: 'id', dictText: 'name',}, + needexp: {title: '需要专家个数',order: 2,view: 'number', type: 'number',}, + proinfo: {title: '简介',order: 3,view: 'text', type: 'string',}, + profile: {title: '附件',order: 4,view: 'file', type: 'string',}, + //子表高级查询 + expandpro: { + title: '评审专家', + view: 'table', + fields: { + expname: {title: '专家名称',order: 1,view: 'popup', type: 'string',code: 'findexp', orgFields: 'realname', destFields: 'expname', popupMulti: false,}, + exptype: {title: '所属领域',order: 2,view: 'text', type: 'string',}, + ssdep: {title: '所属单位',order: 3,view: 'sel_search', type: 'string',dictTable: "sys_depart", dictCode: 'id', dictText: 'depart_name',}, + phone: {title: '专家电话',order: 4,view: 'text', type: 'string',}, + emil: {title: '专家邮箱',order: 5,view: 'text', type: 'string',}, + } + }, +}; diff --git a/jeecgboot-vue3/src/views/expproject/self/ExpprojectList.vue b/jeecgboot-vue3/src/views/expproject/self/ExpprojectList.vue new file mode 100644 index 0000000..a90dd71 --- /dev/null +++ b/jeecgboot-vue3/src/views/expproject/self/ExpprojectList.vue @@ -0,0 +1,277 @@ + + + + diff --git a/jeecgboot-vue3/src/views/expproject/self/V20241023_1__menu_insert_Expproject.sql b/jeecgboot-vue3/src/views/expproject/self/V20241023_1__menu_insert_Expproject.sql new file mode 100644 index 0000000..c109723 --- /dev/null +++ b/jeecgboot-vue3/src/views/expproject/self/V20241023_1__menu_insert_Expproject.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/expproject文件夹下 +-- 如果你想更改到其他目录,请修改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 ('202410230508460320', NULL, '专家项目表', '/expproject/expprojectList', 'expproject/ExpprojectList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-10-23 17:08:32', 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 ('202410230508460321', '202410230508460320', '添加专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', 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 ('202410230508460322', '202410230508460320', '编辑专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', 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 ('202410230508460323', '202410230508460320', '删除专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', 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 ('202410230508460324', '202410230508460320', '批量删除专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', 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 ('202410230508460325', '202410230508460320', '导出excel_专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', 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 ('202410230508460326', '202410230508460320', '导入excel_专家项目表', NULL, NULL, 0, NULL, NULL, 2, 'expproject:expproject:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-23 17:08:32', NULL, NULL, 0, 0, '1', 0); diff --git a/jeecgboot-vue3/src/views/expproject/self/components/ExpprojectForm.vue b/jeecgboot-vue3/src/views/expproject/self/components/ExpprojectForm.vue new file mode 100644 index 0000000..feff137 --- /dev/null +++ b/jeecgboot-vue3/src/views/expproject/self/components/ExpprojectForm.vue @@ -0,0 +1,227 @@ + + + + diff --git a/jeecgboot-vue3/src/views/expproject/self/components/ExpprojectModal.vue b/jeecgboot-vue3/src/views/expproject/self/components/ExpprojectModal.vue new file mode 100644 index 0000000..0a73628 --- /dev/null +++ b/jeecgboot-vue3/src/views/expproject/self/components/ExpprojectModal.vue @@ -0,0 +1,67 @@ + + + +