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);
+ }
+
/**
* 添加
*