From 3d815d5e01c19f7b198cc03a7c85d915018ab7a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 14 Jun 2021 11:33:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/core/xmMenu/XmMenuSelect.vue | 17 +--- src/views/xm/core/xmTask/XmTaskMng.vue | 100 ++++++++++++++++++---- 2 files changed, 85 insertions(+), 32 deletions(-) diff --git a/src/views/xm/core/xmMenu/XmMenuSelect.vue b/src/views/xm/core/xmMenu/XmMenuSelect.vue index bc33b257..2db2ee80 100644 --- a/src/views/xm/core/xmMenu/XmMenuSelect.vue +++ b/src/views/xm/core/xmMenu/XmMenuSelect.vue @@ -22,22 +22,7 @@ - - - - - + @@ -428,6 +456,7 @@ import XmProjectList from '../xmProject/XmProjectList'; import XmMenuRichDetail from '../xmMenu/XmMenuRichDetail'; + import XmProductSelect from '../xmProduct/XmProductSelect';//修改界面 import XmGantt from '../components/xm-gantt'; import XmProjectGroupSelect from '../xmProjectGroup/XmProjectGroupSelect.vue'; @@ -584,6 +613,9 @@ import XmProjectGroupSelect from '../xmProjectGroup/XmProjectGroupSelect.vue'; } }, data() { + const beginDate = new Date(); + const endDate = new Date(); + beginDate.setTime(beginDate.getTime() - 3600 * 1000 * 24 * 7 * 4 * 3 ); return { filters: { key: '', @@ -663,6 +695,12 @@ import XmProjectGroupSelect from '../xmProjectGroup/XmProjectGroupSelect.vue'; groupUserSelectVisible:false,//选择负责人 showSkillSearchVisible:false,//按技能查询 tableHeight:300, + productSelectVisible:false, + dateRanger: [ + util.formatDate.format(beginDate, "yyyy-MM-dd"), + util.formatDate.format(endDate, "yyyy-MM-dd") + ], + pickerOptions: util.pickerOptions('datarange'), /**end 自定义属性请在上面加 请加备注**/ } },//end data @@ -742,9 +780,10 @@ import XmProjectGroupSelect from '../xmProjectGroup/XmProjectGroupSelect.vue'; } params.orderBy= orderBys.join(",") } - if(this.filters.key!==""){ - //params.xxx=this.filters.key - } + if(!this.dateRanger || this.dateRanger.length==0){ + this.$message({ message: "创建日期范围不能为空", type: 'error' }); + return; + } if(this.filters.taskType!="all" && this.filters.taskType!="" && this.filters.taskType!=null){ params.taskType=this.filters.taskType } @@ -798,6 +837,12 @@ import XmProjectGroupSelect from '../xmProjectGroup/XmProjectGroupSelect.vue'; if(this.filters.executor){ params.executorUserid=this.filters.executor.userid } + if(this.filters.product){ + params.productId=this.filters.product.id + } + + params.createTimeStart=this.dateRanger[0]+" 00:00:00" + params.createTimeEnd=this.dateRanger[1]+" 23:59:59" getTask(params).then((res) => { var tips=res.data.tips; if(tips.isOk){ @@ -1444,13 +1489,26 @@ import XmProjectGroupSelect from '../xmProjectGroup/XmProjectGroupSelect.vue'; } return parseFloat(value); }, + + clearProduct(){ + this.filters.product=null; + this.searchXmTasks(); + }, + showProductVisible(){ + this.productSelectVisible=true; + }, + onProductSelected(product){ + this.filters.product=product; + this.productSelectVisible=false; + this.searchXmTasks(); + }, showProjectList:function(){ this.selectProjectVisible=true; }, onPorjectConfirm:function(project){ this.filters.selProject=project this.selectProjectVisible=false; - this.getXmTasks(); + this.searchXmTasks(); }, handleCommand(command) { if(command.type=='showSubAdd'){ @@ -1681,7 +1739,16 @@ import XmProjectGroupSelect from '../xmProjectGroup/XmProjectGroupSelect.vue'; this.searchXmTasks(); } this.batchEditVisible=false; + }, + setFiltersCreateUserAsMySelf(){ + this.filters.createUser=this.userInfo; + this.searchXmTasks(); + }, + setFiltersExecutorAsMySelf(){ + this.filters.executor=this.userInfo; + this.searchXmTasks(); } + /**end 自定义函数请在上面加**/ },//end methods @@ -1693,13 +1760,14 @@ import XmProjectGroupSelect from '../xmProjectGroup/XmProjectGroupSelect.vue'; skillMng, xmProjectPhaseMng, xmTaskTemplateMng, XmProjectList,xmExchangeMng,xmMenuSelect,XmMenuRichDetail,XmGantt,XmTaskMngBatch, -XmProjectGroupSelect +XmProjectGroupSelect,XmProductSelect //在下面添加其它组件 }, mounted() { if(this.selProject){ this.filters.selProject=this.selProject } + this.$nextTick(()=>{ this.getXmTasks(); var clientRect=this.$refs.table.$el.getBoundingClientRect();