From 38ea3ada1094270472bb96107ea591b98f236a67 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 09:31:40 +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 --- config/index.js | 4 +- .../xm/core/xmQuestion/XmQuestionMng.vue | 78 +++++++- .../xm/core/xmTestCase/XmTestCaseMng.vue | 173 ++++++++++++++++- .../core/xmTestCaseExec/XmTestCaseExecMng.vue | 182 +++++++++++++++--- 4 files changed, 404 insertions(+), 33 deletions(-) diff --git a/config/index.js b/config/index.js index d30c6811..1c5ff7ae 100644 --- a/config/index.js +++ b/config/index.js @@ -11,7 +11,7 @@ module.exports = { assetsSubDirectory: 'static', assetsPublicPath: '/', proxyTable: { - /** + '/api/m1/xm': { target: 'http://localhost:7067', changeOrigin: true, @@ -19,7 +19,7 @@ module.exports = { '^/api/m1/xm': '/xm' } }, - + /** '/api/m1/workflow': { target: 'http://localhost:7080', changeOrigin: true, diff --git a/src/views/xm/core/xmQuestion/XmQuestionMng.vue b/src/views/xm/core/xmQuestion/XmQuestionMng.vue index 0e36f2ba..cf29d409 100644 --- a/src/views/xm/core/xmQuestion/XmQuestionMng.vue +++ b/src/views/xm/core/xmQuestion/XmQuestionMng.vue @@ -13,6 +13,8 @@ {{b.optionName}} + {{this.filters.product.productName}} + 选产品 选择故事 {{filters.menus[0].menuName.substr(0,5)}}等({{filters.menus.length}})个 @@ -28,6 +30,10 @@ width="400" trigger="click" > + + 产品:{{this.filters.product.productName}} + 选产品 + 项目: {{ filters.selProject.name }} @@ -36,8 +42,9 @@ 指派给: - 选择被指派人 + 选择被指派人 {{filters.handlerUsername}} + 我的 故事: @@ -58,6 +65,24 @@ + + 创建时间: + + + + 查询 + 导出 @@ -146,6 +171,10 @@ + + + + @@ -164,6 +193,8 @@ import XmGroupMng from '../xmProjectGroup/XmProjectGroupMng'; import XmProjectList from '../xmProject/XmProjectList'; + import XmProductSelect from '../xmProduct/XmProductSelect';//修改界面 + export default { computed: { ...mapGetters([ @@ -186,6 +217,9 @@ } }, data() { + const beginDate = new Date(); + const endDate = new Date(); + beginDate.setTime(beginDate.getTime() - 3600 * 1000 * 24 * 7 * 4 * 3 ); return { filters: { key: '', @@ -197,6 +231,7 @@ handlerUsername:'', selProject:null, menus:[], + product:null, }, xmQuestions: [],//查询结果 pageInfo:{//分页数据 @@ -232,7 +267,8 @@ }, /**begin 自定义属性请在下面加 请加备注**/ selectUserVisible:false, - selectProjectVisible:false, + selectProjectVisible:false, + productSelectVisible:false, nextAction:'', tableHeight:300, cloumns: [ @@ -273,6 +309,11 @@ } ], menuVisible:false, + dateRanger: [ + util.formatDate.format(beginDate, "yyyy-MM-dd"), + util.formatDate.format(endDate, "yyyy-MM-dd") + ], + pickerOptions: util.pickerOptions('datarange'), /**end 自定义属性请在上面加 请加备注**/ } @@ -320,6 +361,12 @@ } params.orderBy= orderBys.join(",") } + + + if(!this.dateRanger || this.dateRanger.length==0){ + this.$message({ message: "创建日期范围不能为空", type: 'error' }); + return; + } if( this.filters.bugStatus!=null && this.filters.bugStatus!="" ){ params.bugStatus=this.filters.bugStatus } @@ -340,6 +387,12 @@ }else if(this.filters.menus && this.filters.menus.length>1){ params.menuIds=this.filters.menus.map(i=>i.menuId) } + + 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" this.load.list = true; if(this.filters.selProject){ params.projectId = this.filters.selProject.id; @@ -368,6 +421,18 @@ }).catch( err => this.load.list = false ); }, + clearProduct(){ + this.filters.product=null; + this.searchXmQuestions(); + }, + showProductVisible(){ + this.productSelectVisible=true; + }, + onProductSelected(product){ + this.filters.product=product; + this.productSelectVisible=false; + this.searchXmQuestions(); + }, showMenu(){ this.menuVisible=true; }, @@ -709,17 +774,24 @@ this.sendToProcessApprova(command.data,command.bizKey); } }, + setFiltersHandlerAsMySelf(){ + this.filters.handlerUserid=this.userInfo.userid; + this.filters.handlerUsername=this.userInfo.username; + this.searchXmQuestions(); + } },//end methods components: { 'xm-question-add':XmQuestionAdd, 'xm-question-edit':XmQuestionEdit, - XmGroupMng,XmProjectList,xmMenuSelect, + XmGroupMng,XmProjectList,xmMenuSelect,XmProductSelect //在下面添加其它组件 }, mounted() { if(this.selProject){ this.filters.selProject=this.selProject } + this.filters.handlerUserid=this.userInfo.userid; + this.filters.handlerUsername=this.userInfo.username; this.$nextTick(() => { var clientRect=this.$refs.table.$el.getBoundingClientRect(); var subHeight=50/1000 * window.innerHeight; diff --git a/src/views/xm/core/xmTestCase/XmTestCaseMng.vue b/src/views/xm/core/xmTestCase/XmTestCaseMng.vue index c7c7db13..40d24745 100644 --- a/src/views/xm/core/xmTestCase/XmTestCaseMng.vue +++ b/src/views/xm/core/xmTestCase/XmTestCaseMng.vue @@ -2,8 +2,10 @@
+ {{this.filters.product.productName}} + 选产品 选择故事 - {{filters.menus[0].menuName.substr(0,5)}}等({{filters.menus.length}})个 + {{filters.menus[0].menuName.substr(0,5)}}等({{filters.menus.length}})个 @@ -73,7 +134,10 @@ import XmTestCaseEdit from './XmTestCaseEdit';//修改界面 import { mapGetters } from 'vuex' import xmMenuSelect from '../xmMenu/XmMenuSelect'; + import XmProductSelect from '../xmProduct/XmProductSelect';//修改界面 + import XmProjectList from '../xmProject/XmProjectList'; + import XmGroupMng from '../xmProjectGroup/XmProjectGroupMng'; export default { computed: { @@ -83,10 +147,15 @@ }, props:['multiSelect'], data() { - return { + const beginDate = new Date(); + const endDate = new Date(); + beginDate.setTime(beginDate.getTime() - 3600 * 1000 * 24 * 7 * 4 * 3 ); return { filters: { key: '', menus:[], + product:null, + selProject:null, + luser:null, }, xmTestCases: [],//查询结果 pageInfo:{//分页数据 @@ -110,6 +179,7 @@ }, editFormVisible: false,//编辑界面是否显示 + productSelectVisible:false, //编辑xmTestCase界面初始化数据 editForm: { id:'',caseName:'',caseRemark:'',testStep:'',expectResult:'',menuId:'',menuName:'',ctime:'',ltime:'',luserid:'',lusername:'',cbranchId:'',moduleId:'',moduleName:'',caseStatus:'' @@ -117,6 +187,16 @@ /**begin 自定义属性请在下面加 请加备注**/ menuVisible:false, tableHeight:300, + + selectProjectVisible:false, + selectUserForFiltersVisible:false, + productSelectVisible:false, + nextAction:'', + dateRanger: [ + util.formatDate.format(beginDate, "yyyy-MM-dd"), + util.formatDate.format(endDate, "yyyy-MM-dd") + ], + pickerOptions: util.pickerOptions('datarange'), /**end 自定义属性请在上面加 请加备注**/ } },//end data @@ -170,6 +250,22 @@ //params.xxx=xxxxx } + if(!this.dateRanger || this.dateRanger.length==0){ + this.$message({ message: "创建日期范围不能为空", type: 'error' }); + return; + } + if(this.filters.product){ + params.productId=this.filters.product.id + } + if(this.filters.luser){ + params.myUserid=this.filters.luser.userid + } + if(this.filters.selProject){ + params.projectId=this.filters.selProject.id + } + + params.ctimeStart=this.dateRanger[0]+" 00:00:00" + params.ctimeEnd=this.dateRanger[1]+" 23:59:59" if(this.filters.key){ params.key='%'+this.filters.key+'%' } @@ -269,6 +365,18 @@ }, /**begin 自定义函数请在下面加**/ + clearProduct(){ + this.filters.product=null; + this.searchXmTestCases(); + }, + showProductVisible(){ + this.productSelectVisible=true; + }, + onProductSelected(product){ + this.filters.product=product; + this.productSelectVisible=false; + this.searchXmTestCases(); + }, showMenu(){ this.menuVisible=true; }, @@ -283,13 +391,61 @@ this.filters.menus=menus; this.getXmTestCases(); }, - clearFiltersMneu(menu){ + clearFiltersMenu(menu){ var index=this.filters.menus.findIndex(i=>i.menuId==menu.menuId) this.filters.menus.splice(index,1); this.getXmTestCases(); }, selected(){ this.$emit("selected",this.sels) + }, + + clearProject(){ + this.filters.selProject=null + this.searchXmTestCases() + }, + showProjectList:function(){ + this.selectProjectVisible=true; + }, + onPorjectConfirm:function(project){ + this.filters.selProject=project + this.selectProjectVisible=false; + this.searchXmTestCases(); + if(this.nextAction=="showExecUsersForFilters"){ + this.showExecUsersForFilters(); + this.nextAction="" + } + }, + + clearFiltersExecUser(){ + this.filters.luser=null; + this.searchXmTestCases(); + }, + showExecUsersForFilters:function(){ + if(!this.filters.selProject){ + this.nextAction="showExecUsersForFilters" + this.showProjectList(); + }else{ + this.selectUserForFiltersVisible=true; + } + + }, + onFiltersUserConfirm:function(groupUsers){ + if(groupUsers==null || groupUsers.length==0){ + this.filters.luser=null + }else{ + this.filters.luser=groupUsers[0] + } + if(this.nextAction=="showExecUsersForFilters"){ + this.nextAction="" + } + this.selectUserForFiltersVisible=false + this.searchXmTestCases(); + }, + + setFiltersHandlerAsMySelf(){ + this.filters.luser=this.userInfo; + this.searchXmTestCases(); } /**end 自定义函数请在上面加**/ @@ -297,11 +453,12 @@ components: { 'xm-test-case-add':XmTestCaseAdd, 'xm-test-case-edit':XmTestCaseEdit, - xmMenuSelect, + xmMenuSelect,XmProductSelect,XmProjectList,XmGroupMng //在下面添加其它组件 }, mounted() { this.$nextTick(() => { + this.filters.luser=this.userInfo; this.getXmTestCases(); var clientRect=this.$refs.table.$el.getBoundingClientRect(); var subHeight=65; @@ -324,4 +481,10 @@ \ No newline at end of file diff --git a/src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue b/src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue index 8f56d9c2..79388f4a 100644 --- a/src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue +++ b/src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue @@ -5,7 +5,7 @@ {{ this.filters.selProject.name }} 选择项目 选择故事 - {{filters.menus[0].menuName.substr(0,5)}}等({{filters.menus.length}})个 + {{filters.menus[0].menuName.substr(0,5)}}等({{filters.menus.length}})个