diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/controller/ProjectFileController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/controller/ProjectFileController.java index 53df7f9..61932d1 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/controller/ProjectFileController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/controller/ProjectFileController.java @@ -51,6 +51,27 @@ public class ProjectFileController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(projectFile, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = projectFileService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * @description: 项目书-正文附件 列表 + * @param: [projectFile, pageNo, pageSize, req] + * @return: org.jeecg.common.api.vo.Result> + * @author: z.h.c + * @date: 24/10/22 10:26 + */ + @ApiOperation(value = "项目书-正文附件-分页列表查询", notes = "项目书-正文附件-分页列表查询") + @GetMapping(value = "/list4zhengWen") + public Result> queryPageList4zhengWen(ProjectFile projectFile, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + projectFile.setFileFlag("zhengwen"); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(projectFile, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = projectFileService.page(page, queryWrapper); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/entity/ProjectFile.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/entity/ProjectFile.java index 2f8d00c..7b02353 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/entity/ProjectFile.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFile/entity/ProjectFile.java @@ -69,5 +69,9 @@ public class ProjectFile implements Serializable { */ @Excel(name = "附件地址", width = 255) @ApiModelProperty(value = "附件地址") - private java.lang.String ossFileId; + private java.lang.String fileUrl; + +// @Excel(name = "附件地址", width = 255) + @ApiModelProperty(value = "附件标识 fujian:附件tab页显示,zhengwen:正文件tab页显示") + private java.lang.String fileFlag; } diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/FuJianDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/FuJianDemo.vue new file mode 100644 index 0000000..21475a6 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/FuJianDemo.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/JUploadDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/JUploadDemo.vue deleted file mode 100644 index 2011aac..0000000 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/JUploadDemo.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - - diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue new file mode 100644 index 0000000..e3c9592 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/ZhengWenDemo.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue index 5e6f3c0..ca82059 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue @@ -3,6 +3,7 @@ + @@ -13,7 +14,7 @@ - + @@ -31,11 +32,12 @@ import YiJianDemo from './YiJianDemo.vue'; import HeZuoDanWeiDemo from './HeZuoDanWeiDemo.vue'; import ZhuYaoRenYuanDemo from './ZhuYaoRenYuanDemo.vue'; + import ZhengWenDemo from './ZhengWenDemo.vue'; import XiangMuHeZuoKaiFaDemo from './XiangMuHeZuoKaiFaDemo.vue'; import ImgDragSort from './ImgDragSort.vue'; import ImgTurnPage from './ImgTurnPage.vue'; import JeecgPdfView from './JeecgPdfView.vue'; - import JUploadDemo from './JUploadDemo.vue'; + import FuJianDemo from './FuJianDemo.vue'; import { useRouter } from 'vue-router'; export default defineComponent({ @@ -46,6 +48,7 @@ const currentComponent = computed(() => { const componentType = { TianBaoShuMingDemo: TianBaoShuMingDemo, + ZhengWenDemo: ZhengWenDemo, XiangMuHeZuoKaiFaDemo: XiangMuHeZuoKaiFaDemo, XiangMuJiXiaoMuBiaoDemo: XiangMuJiXiaoMuBiaoDemo, YiJianDemo: YiJianDemo, @@ -56,7 +59,7 @@ // ImgDragSort: ImgDragSort, // ImgTurnPage: ImgTurnPage, JeecgPdfView: JeecgPdfView, - JUploadDemo: JUploadDemo, + FuJianDemo: FuJianDemo, }; return componentType[activeKey.value]; }); diff --git a/jeecgboot-vue3/src/views/projectFile/ProjectFile.data.ts b/jeecgboot-vue3/src/views/projectFile/ProjectFile.data.ts index 8747af1..eac21f7 100644 --- a/jeecgboot-vue3/src/views/projectFile/ProjectFile.data.ts +++ b/jeecgboot-vue3/src/views/projectFile/ProjectFile.data.ts @@ -3,17 +3,18 @@ import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; +import {UploadTypeEnum} from "@/components/Form/src/jeecg/components/JUpload"; //列表数据 export const columns: BasicColumn[] = [ - { + /* { title: '项目表id', align:"center", dataIndex: 'projectId' - }, + },*/ { - title: '附件地址', + title: '附件', align:"center", - dataIndex: 'ossFileId', + dataIndex: 'fileUrl', }, ]; //查询数据 @@ -27,11 +28,15 @@ export const formSchema: FormSchema[] = [ component: 'Input', }, { - label: '附件地址', - field: 'ossFileId', + label: '上传附件', + field: 'fileUrl', + labelLength: 100, component: 'JUpload', - componentProps:{ - }, + helpMessage: '1次最多上传1个文件,可多次上传', + componentProps: { + fileType: UploadTypeEnum.all, + maxCount: 1, + }, }, // TODO 主键隐藏字段,目前写死为ID { @@ -45,7 +50,7 @@ export const formSchema: FormSchema[] = [ // 高级查询数据 export const superQuerySchema = { projectId: {title: '申报表id',order: 0,view: 'text', type: 'string',}, - ossFile: {title: '附件地址',order: 1,view: 'file', type: 'string',}, + fileUrl: {title: '附件地址',order: 1,view: 'file', type: 'string',}, }; /** diff --git a/jeecgboot-vue3/src/views/projectFile/ProjectFileList.vue b/jeecgboot-vue3/src/views/projectFile/ProjectFileList.vue index 71b49bc..08c18a1 100644 --- a/jeecgboot-vue3/src/views/projectFile/ProjectFileList.vue +++ b/jeecgboot-vue3/src/views/projectFile/ProjectFileList.vue @@ -29,7 +29,7 @@