需求管理

master
Gitea 1 year ago
parent 66ea95e0ab
commit e83170404b
  1. 31
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 5
      ant-design-vue-jeecg/src/views/requirementitem/RequirementItemList.vue
  3. 37
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/requirementitem/controller/RequirementItemController.java

@ -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();
},

@ -41,7 +41,6 @@
</span>
</a-col>
</a-row>
<a-input v-model="queryParam.createBy"></a-input>
</a-form>
</div>
<!-- 查询区域-END -->
@ -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)=>{

@ -93,6 +93,43 @@ public class RequirementItemController extends JeecgController<RequirementItem,
return Result.OK(pageList);
}
/**
* 我的需求
*
* @param requirementItem
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "需求管理-分页列表查询")
@ApiOperation(value="需求管理-分页列表查询", notes="需求管理-分页列表查询")
@GetMapping(value = "/wdxqlist")
public Result<?> 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<RequirementItem> queryWrapper = QueryGenerator.initQueryWrapper(requirementItem, req.getParameterMap());
queryWrapper.eq("create_by",principal.getUsername());
Page<RequirementItem> page = new Page<RequirementItem>(pageNo, pageSize);
IPage<RequirementItem> 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);
}
/**
* 添加
*

Loading…
Cancel
Save