From e83170404b1efcb721c655a4e1cddf3df10bb494 Mon Sep 17 00:00:00 2001 From: Gitea Date: Fri, 30 Jun 2023 16:53:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=9C=80=E6=B1=82=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/mixins/JeecgListMixin.js | 31 ++++++++++++++++ .../requirementitem/RequirementItemList.vue | 5 +-- .../controller/RequirementItemController.java | 37 +++++++++++++++++++ 3 files changed, 70 insertions(+), 3 deletions(-) diff --git a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js index 7c0764e..f329e1b 100644 --- a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js +++ b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js @@ -108,6 +108,34 @@ export const JeecgListMixin = { this.loading = false; }) }, + loadDatawdxq(arg) { + if (!this.url.wdxqlist) { + this.$message.error("请设置url.list属性!") + return + } + //加载数据 若传入参数1则加载第一页的内容 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//查询条件 + this.loading = true; + getAction(this.url.wdxqlist, params).then((res) => { + if (res.success) { + //update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ + } + if (res.code === 510) { + this.$message.warning(res.message) + } + this.loading = false; + }) + }, initDictConfig() { console.log("--这是一个假的方法!") }, @@ -156,6 +184,9 @@ export const JeecgListMixin = { searchQuery() { this.loadData(1); }, + searchQuerywdxq() { + this.loadDatawdxq(1); + }, superQuery() { this.$refs.superQueryModal.show(); }, diff --git a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue index d128c25..9a22be7 100644 --- a/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue +++ b/ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue @@ -41,7 +41,6 @@ - @@ -229,6 +228,7 @@ importExcelUrl: "requirementitem/requirementItem/importExcel", qrxq:"/requirementitem/requirementItem/qrxq", checkqx:"/requirementtype/requirementType/checkqx", + wdxqlist:"/requirementitem/requirementItem/wdxqlist", }, dictOptions:{}, @@ -245,8 +245,7 @@ }, methods: { wdxq(){ - this.queryParam.createBy = 'admin'; - this.searchQuery(); + this.searchQuerywdxq(); }, qrxq(id){ getAction(this.url.qrxq,{id:id}).then((res)=>{ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementitem/controller/RequirementItemController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementitem/controller/RequirementItemController.java index 9b43895..4d5c3d9 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementitem/controller/RequirementItemController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementitem/controller/RequirementItemController.java @@ -93,6 +93,43 @@ public class RequirementItemController extends JeecgController wdxqlist(RequirementItem requirementItem, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + LoginUser principal = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(requirementItem, req.getParameterMap()); + queryWrapper.eq("create_by",principal.getUsername()); + Page page = new Page(pageNo, pageSize); + IPage pageList = requirementItemService.page(page, queryWrapper); + for (int i = 0 ; i < pageList.getRecords().size();i++){ + Projectx projectx = projectxService.getById(pageList.getRecords().get(i).getProjectId()); + if(!principal.getUsername().equals("admin")){ + if(projectx.getCreateBy().equals(principal.getUsername())){ + pageList.getRecords().get(i).setXqflag("1"); + }else{ + pageList.getRecords().get(i).setXqflag("0"); + } + }else{ + pageList.getRecords().get(i).setXqflag("1"); + } + + } + return Result.OK(pageList); + } + /** * 添加 * From 23a0c8e34d9ce9e151c113336cb5530a8851f971 Mon Sep 17 00:00:00 2001 From: shiji <1913712590@qq.com> Date: Fri, 30 Jun 2023 16:59:26 +0800 Subject: [PATCH 2/4] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=9A=E6=8C=89=E9=A1=B9=E7=9B=AE=E5=90=8D=E3=80=81=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=B8=AD=E6=96=87=E5=90=8D=E3=80=81=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E5=90=8D=E3=80=81=E6=A8=A1=E5=9D=97=E7=BC=96?= =?UTF-8?q?=E7=A0=81=E3=80=81=E4=B8=8A=E7=BA=A7=E6=A8=A1=E5=9D=97=E5=90=8D?= =?UTF-8?q?=E3=80=81=E6=8C=89=E7=8A=B6=E6=80=81=E6=9F=A5=E8=AF=A2=E3=80=81?= =?UTF-8?q?=202.=E7=AE=A1=E7=90=86=E4=B8=AD=E2=80=9C=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E2=80=9D=E6=94=B9=E4=B8=BA=E5=BC=B9=E7=AA=97=EF=BC=8C=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AA=E2=80=9C=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E5=AD=97=E6=AE=B5=E2=80=9D=E7=9A=84=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E5=BC=B9=E7=AA=97=E7=9A=84=E5=BD=A2=E5=BC=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=AE=9E=E4=BD=93=E7=9A=84=E5=90=84=E4=B8=AA?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=88=E5=8D=B3=E5=AE=9E=E4=BD=93=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=B8=AD=E7=9A=84=E5=AD=97=E6=AE=B5=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=203.=E8=A7=84=E5=88=99=E7=AE=A1=E7=90=86=E5=81=9A=E6=88=90?= =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E7=9A=84=EF=BC=8C=E5=8D=B3=E4=B8=8D=E9=9A=8F?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=E5=B7=A6=E5=8F=B3=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=204.=E5=8A=9F=E8=83=BD=E6=A8=A1=E6=9D=BF=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=205.=E2=80=9C=E6=A8=A1=E6=9D=BF=E2=80=9D?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=94=B9=E4=B8=BA=E2=80=9C=E6=8C=89=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=96=B0=E5=A2=9E=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/functionx/FunctionxList.vue | 3 +- .../src/views/modulex/ModulexList.vue | 66 ++++++- .../src/views/tablex/TablexList.vue | 171 +++++++++++------- .../FunctionTemplateController.java | 2 +- 4 files changed, 163 insertions(+), 79 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue index eab2b01..d6d69e5 100644 --- a/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue +++ b/ant-design-vue-jeecg/src/views/functionx/FunctionxList.vue @@ -40,7 +40,7 @@
新增 - 模板 + 按模板新增 导出 @@ -282,6 +282,7 @@ title: '规则管理', align:"center", dataIndex: 'action1', + fixed:"right", width:147, scopedSlots: { customRender: 'action1' } }, diff --git a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue index c887df3..046234b 100644 --- a/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue +++ b/ant-design-vue-jeecg/src/views/modulex/ModulexList.vue @@ -6,10 +6,35 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -57,6 +82,8 @@ 实体 + + 字段 @@ -119,7 +146,8 @@ - + + @@ -134,11 +162,15 @@ import {getAction} from "@api/manage"; import BugxModal from "@views/modulex/modules/BugxModal"; import store from "@/store"; import {filterObj} from "@/utils/util"; +import FieldxList from "@views/fieldx/FieldxList.vue"; +import TablexList from "@views/tablex/TablexList.vue"; export default { name: 'ModulexList', mixins: [JeecgListMixin, mixinDevice], components: { + TablexList, + FieldxList, BugxModal, ModulexModal }, @@ -357,6 +389,22 @@ export default { } }) }, + viewVid(record) { + // console.log(record) + let s = null; + getAction('/tablex/tablex/list', {moduleId: record.id}).then((res) =>{ + s=res.result.records + console.log(s) + if (s[0]==null){ + this.$message.error("该模块无实体"); + }else{ + this.$refs.FieldxList.showModal(); + this.$refs.FieldxList.edit(s[0]); + this.$refs.FieldxList.disableSubmit = false; + } + }) + + }, bugfankui: function (record) { this.$refs.BugxModal.add(record.id); this.$refs.BugxModal.title = "BUG反馈"; @@ -415,10 +463,13 @@ export default { }) }, tablexManage(record) { - this.$router.push({ - path: '/src/views/tablex/TablexList', - query: {moduleid: record.id,project:this.$route.query.project} - }) + this.$refs.TablexList.showModal(); + this.$refs.TablexList.edit(record); + this.$refs.TablexList.disableSubmit = false; + // this.$router.push({ + // path: '/src/views/tablex/TablexList', + // query: {moduleid: record.id,project:this.$route.query.project} + // }) }, initDictConfig() { }, @@ -496,7 +547,8 @@ export default { param.pageNo = this.ipagination.current; param.pageSize = this.ipagination.pageSize; //param.id=this.id; - param.projectId = this.$route.query.project; + //!!!!!!! + // param.projectId = this.$route.query.project; // console.log('paaaaaaaaaaaaaaaaaaaaa') return filterObj(param); }, diff --git a/ant-design-vue-jeecg/src/views/tablex/TablexList.vue b/ant-design-vue-jeecg/src/views/tablex/TablexList.vue index 1b96b26..6d36fe1 100644 --- a/ant-design-vue-jeecg/src/views/tablex/TablexList.vue +++ b/ant-design-vue-jeecg/src/views/tablex/TablexList.vue @@ -1,59 +1,66 @@ - + + + @@ -110,7 +117,7 @@ - +