diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/controller/ProjectOpinionController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/controller/ProjectOpinionController.java new file mode 100644 index 0000000..26a67d5 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/controller/ProjectOpinionController.java @@ -0,0 +1,162 @@ +package org.jeecg.modules.demo.projectOpinion.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.demo.projectOpinion.entity.ProjectOpinion; +import org.jeecg.modules.demo.projectOpinion.service.IProjectOpinionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + +/** + * @Description: 意见 + * @Author: jeecg-boot + * @Date: 2024-10-21 + * @Version: V1.0 + */ +@Api(tags = "意见") +@RestController +@RequestMapping("/projectOpinion/projectOpinion") +@Slf4j +public class ProjectOpinionController extends JeecgController { + @Autowired + private IProjectOpinionService projectOpinionService; + + /** + * 分页列表查询 + * + * @param projectOpinion + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "意见-分页列表查询") + @ApiOperation(value = "意见-分页列表查询", notes = "意见-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(ProjectOpinion projectOpinion, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(projectOpinion, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = projectOpinionService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param projectOpinion + * @return + */ + @AutoLog(value = "意见-添加") + @ApiOperation(value = "意见-添加", notes = "意见-添加") +// @RequiresPermissions("projectOpinion:project_opinion:add") + @PostMapping(value = "/add") + public Result add(@RequestBody ProjectOpinion projectOpinion) { + projectOpinionService.save(projectOpinion); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param projectOpinion + * @return + */ + @AutoLog(value = "意见-编辑") + @ApiOperation(value = "意见-编辑", notes = "意见-编辑") +// @RequiresPermissions("projectOpinion:project_opinion:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody ProjectOpinion projectOpinion) { + projectOpinionService.updateById(projectOpinion); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "意见-通过id删除") + @ApiOperation(value = "意见-通过id删除", notes = "意见-通过id删除") +// @RequiresPermissions("projectOpinion:project_opinion:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + projectOpinionService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "意见-批量删除") + @ApiOperation(value = "意见-批量删除", notes = "意见-批量删除") +// @RequiresPermissions("projectOpinion:project_opinion:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + this.projectOpinionService.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) { + ProjectOpinion projectOpinion = projectOpinionService.getById(id); + if (projectOpinion == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(projectOpinion); + } + + /** + * 导出excel + * + * @param request + * @param projectOpinion + */ +// @RequiresPermissions("projectOpinion:project_opinion:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ProjectOpinion projectOpinion) { + return super.exportXls(request, projectOpinion, ProjectOpinion.class, "意见"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("projectOpinion:project_opinion:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ProjectOpinion.class); + } + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/entity/ProjectOpinion.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/entity/ProjectOpinion.java new file mode 100644 index 0000000..b2ae43b --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/entity/ProjectOpinion.java @@ -0,0 +1,80 @@ +package org.jeecg.modules.demo.projectOpinion.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 意见 + * @Author: jeecg-boot + * @Date: 2024-10-21 + * @Version: V1.0 + */ +@Data +@TableName("project_opinion") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "project_opinion对象", description = "意见") +public class ProjectOpinion 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; + /** + * 项目id + */ + @Excel(name = "项目id", width = 15) + @ApiModelProperty(value = "项目id") + private String projectId; + /** + * 申请单位意见 + */ + @Excel(name = "申请单位意见", width = 15) + @ApiModelProperty(value = "申请单位意见") + private String applyDepartPinion; + /** + * 推荐部门意见 + */ + @Excel(name = "推荐部门意见", width = 15) + @ApiModelProperty(value = "推荐部门意见") + private String presentDepartOpinion; +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/mapper/ProjectOpinionMapper.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/mapper/ProjectOpinionMapper.java new file mode 100644 index 0000000..16e7964 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/mapper/ProjectOpinionMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.projectOpinion.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.projectOpinion.entity.ProjectOpinion; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 意见 + * @Author: jeecg-boot + * @Date: 2024-10-21 + * @Version: V1.0 + */ +public interface ProjectOpinionMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/mapper/xml/ProjectOpinionMapper.xml b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/mapper/xml/ProjectOpinionMapper.xml new file mode 100644 index 0000000..fe5a62f --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/mapper/xml/ProjectOpinionMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/service/IProjectOpinionService.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/service/IProjectOpinionService.java new file mode 100644 index 0000000..54808e8 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/service/IProjectOpinionService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.projectOpinion.service; + +import org.jeecg.modules.demo.projectOpinion.entity.ProjectOpinion; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 意见 + * @Author: jeecg-boot + * @Date: 2024-10-21 + * @Version: V1.0 + */ +public interface IProjectOpinionService extends IService { + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/service/impl/ProjectOpinionServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/service/impl/ProjectOpinionServiceImpl.java new file mode 100644 index 0000000..8da07f9 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectOpinion/service/impl/ProjectOpinionServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.projectOpinion.service.impl; + +import org.jeecg.modules.demo.projectOpinion.entity.ProjectOpinion; +import org.jeecg.modules.demo.projectOpinion.mapper.ProjectOpinionMapper; +import org.jeecg.modules.demo.projectOpinion.service.IProjectOpinionService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 意见 + * @Author: jeecg-boot + * @Date: 2024-10-21 + * @Version: V1.0 + */ +@Service +public class ProjectOpinionServiceImpl extends ServiceImpl implements IProjectOpinionService { + +} diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/YiJianDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/YiJianDemo.vue index d27cbbf..fd922c0 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/YiJianDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/YiJianDemo.vue @@ -1,129 +1,221 @@ - - - - diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhuYaoRenYuanDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhuYaoRenYuanDemo.vue new file mode 100644 index 0000000..3113cd3 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhuYaoRenYuanDemo.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue index 29ade64..5e6f3c0 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue @@ -5,10 +5,11 @@ - - - - + + + + + @@ -29,6 +30,7 @@ import XiangMuJiXiaoMuBiaoDemo from './XiangMuJiXiaoMuBiaoDemo.vue'; import YiJianDemo from './YiJianDemo.vue'; import HeZuoDanWeiDemo from './HeZuoDanWeiDemo.vue'; + import ZhuYaoRenYuanDemo from './ZhuYaoRenYuanDemo.vue'; import XiangMuHeZuoKaiFaDemo from './XiangMuHeZuoKaiFaDemo.vue'; import ImgDragSort from './ImgDragSort.vue'; import ImgTurnPage from './ImgTurnPage.vue'; @@ -39,7 +41,6 @@ export default defineComponent({ name: 'comp-jeecg-basic', setup() { - // const activeKey = ref('JeecgComponents'); const { back } = useRouter(); const activeKey = ref('TianBaoShuMingDemo'); const currentComponent = computed(() => { @@ -49,10 +50,11 @@ XiangMuJiXiaoMuBiaoDemo: XiangMuJiXiaoMuBiaoDemo, YiJianDemo: YiJianDemo, HeZuoDanWeiDemo: HeZuoDanWeiDemo, - JeecgComponents: JeecgComponents, - JEditorDemo: JEditorDemo, - ImgDragSort: ImgDragSort, - ImgTurnPage: ImgTurnPage, + ZhuYaoRenYuanDemo: ZhuYaoRenYuanDemo, + // JeecgComponents: JeecgComponents, + // JEditorDemo: JEditorDemo, + // ImgDragSort: ImgDragSort, + // ImgTurnPage: ImgTurnPage, JeecgPdfView: JeecgPdfView, JUploadDemo: JUploadDemo, }; diff --git a/jeecgboot-vue3/src/views/projectOpinion/ProjectOpinion.api.ts b/jeecgboot-vue3/src/views/projectOpinion/ProjectOpinion.api.ts new file mode 100644 index 0000000..850c225 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectOpinion/ProjectOpinion.api.ts @@ -0,0 +1,64 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/projectOpinion/projectOpinion/list', + save='/projectOpinion/projectOpinion/add', + edit='/projectOpinion/projectOpinion/edit', + deleteOne = '/projectOpinion/projectOpinion/delete', + deleteBatch = '/projectOpinion/projectOpinion/deleteBatch', + importExcel = '/projectOpinion/projectOpinion/importExcel', + exportXls = '/projectOpinion/projectOpinion/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}); + +/** + * 删除单个 + */ +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}); +} diff --git a/jeecgboot-vue3/src/views/projectOpinion/ProjectOpinion.data.ts b/jeecgboot-vue3/src/views/projectOpinion/ProjectOpinion.data.ts new file mode 100644 index 0000000..9960eb0 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectOpinion/ProjectOpinion.data.ts @@ -0,0 +1,64 @@ +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: 'applyDepartPinion' + }, + { + title: '推荐部门意见', + align:"center", + dataIndex: 'presentDepartOpinion' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '申请单位意见', + field: 'applyDepartPinion', + component: 'InputTextArea', + componentProps: { + // placeholder: '请输入公司地址', + rows: 5, + }, + }, + { + label: '推荐部门意见', + field: 'presentDepartOpinion', + component: 'InputTextArea', + componentProps: { + // placeholder: '请输入公司地址', + rows: 5, + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + applyDepartPinion: {title: '申请单位意见',order: 0,view: 'text', type: 'string',}, + presentDepartOpinion: {title: '推荐部门意见',order: 1,view: 'text', type: 'string',}, +}; + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[]{ + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} diff --git a/jeecgboot-vue3/src/views/projectOpinion/ProjectOpinionList.vue b/jeecgboot-vue3/src/views/projectOpinion/ProjectOpinionList.vue new file mode 100644 index 0000000..0cb5727 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectOpinion/ProjectOpinionList.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/projectOpinion/components/ProjectOpinionForm.vue b/jeecgboot-vue3/src/views/projectOpinion/components/ProjectOpinionForm.vue new file mode 100644 index 0000000..fc6601a --- /dev/null +++ b/jeecgboot-vue3/src/views/projectOpinion/components/ProjectOpinionForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/projectOpinion/components/ProjectOpinionModal.vue b/jeecgboot-vue3/src/views/projectOpinion/components/ProjectOpinionModal.vue new file mode 100644 index 0000000..124ff79 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectOpinion/components/ProjectOpinionModal.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file