From 6bf29e8fefeabeb831871e07ca33a182a1618fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 16 Jan 2023 22:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/routes_xm.js | 119 +++++++++++++++++- src/store/getters.js | 1 + src/store/index.js | 4 +- src/store/modules/iterationInfo.js | 29 ----- src/store/modules/xmIteration.js | 29 +++++ .../xm/core/xmIteration/XmIterationMng.vue | 15 ++- .../XmIterationOverviewComplex.vue | 4 +- src/views/xm/core/xmIteration/top-nav.vue | 4 +- src/views/xm/core/xmMenu/XmMenuBox.vue | 6 + .../xm/core/xmMenu/XmMenuBoxForIteration.vue | 48 +++++++ .../xm/core/xmMenu/XmMenuBoxForProduct.vue | 2 +- .../xm/core/xmMenu/XmMenuBoxForProject.vue | 2 +- src/views/xm/core/xmMenu/XmMenuSelect.vue | 2 +- src/views/xm/core/xmProduct/top-nav.vue | 2 +- src/views/xm/core/xmProject/top-nav.vue | 2 +- .../xm/core/xmQuestion/XmQuestionEdit.vue | 4 +- .../xmQuestion/XmQuestionForIteration.vue | 52 ++++++++ .../xm/core/xmQuestion/XmQuestionMng.vue | 9 +- .../xm/core/xmRecord/XmRecordForIteration.vue | 40 ++++++ src/views/xm/core/xmTask/XmTaskAdd.vue | 18 ++- src/views/xm/core/xmTask/XmTaskEdit.vue | 4 +- .../xm/core/xmTask/XmTaskListForIteration.vue | 50 ++++++++ src/views/xm/core/xmTask/XmTaskMng.vue | 1 + src/views/xm/rpt/reportIndexForIteration.vue | 40 ++++++ 24 files changed, 430 insertions(+), 57 deletions(-) delete mode 100644 src/store/modules/iterationInfo.js create mode 100644 src/store/modules/xmIteration.js create mode 100644 src/views/xm/core/xmMenu/XmMenuBoxForIteration.vue create mode 100644 src/views/xm/core/xmQuestion/XmQuestionForIteration.vue create mode 100644 src/views/xm/core/xmRecord/XmRecordForIteration.vue create mode 100644 src/views/xm/core/xmTask/XmTaskListForIteration.vue create mode 100644 src/views/xm/rpt/reportIndexForIteration.vue diff --git a/src/router/routes_xm.js b/src/router/routes_xm.js index b4bc2eb7..317977c2 100644 --- a/src/router/routes_xm.js +++ b/src/router/routes_xm.js @@ -2,6 +2,7 @@ import Layout from '../views/layout/Layout' import XmProjectLayout from '../views/xm/core/xmProject/index' import XmProductLayout from '../views/xm/core/xmProduct/index' +import XmIterationLayout from '../views/xm/core/xmIteration/index' const _import = require('./_import_' + process.env.NODE_ENV) export default { @@ -99,7 +100,7 @@ export default { { path: 'task', component: _import('xm/core/xmTask/XmTaskListForProject'), - name: 'projectMenu', + name: 'projectTask', iconCls: 'fa el-icon-menu', meta: { title: '项目-任务', @@ -301,7 +302,7 @@ export default { { path: 'task', component: _import('xm/core/xmTask/XmTaskListForProduct'), - name: 'productMenu', + name: 'productTask', iconCls: 'fa el-icon-menu', meta: { title: '产品-任务', @@ -412,6 +413,120 @@ export default { ] }, + { + path: '/xm/core/iteration', + component: XmIterationLayout, + name: '迭代管理', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代管理', + icon: 'iteration' + }, + hidden:true, + // leaf: true,//只有一个节点 + children: [ + { + path: 'overview', + component: _import('xm/core/xmIteration/XmIterationOverviewComplex'), + name: 'iterationOverview', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代-首页', + icon: 'iteration',roles:["user"] + }, + hidden:true + }, + { + path: 'project', + component: _import('xm/core/xmProject/XmProjectForLinkComplex'), + name: 'iterationProjectLink', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代-项目', + icon: 'iteration',roles:["user"] + }, + hidden:true + }, + { + path: 'menu', + component: _import('xm/core/xmMenu/XmMenuBoxForIteration'), + name: 'iterationMenu', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代-需求', + icon: 'iteration',roles:["user"] + }, + hidden:true + }, + { + path: 'task', + component: _import('xm/core/xmTask/XmTaskListForIteration'), + name: 'iterationTask', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代-任务', + icon: 'iteration',roles:["user"] + }, + hidden:true + }, + { + path: 'question', + component: _import('xm/core/xmQuestion/XmQuestionForIteration'), + name: 'iterationQuestion', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代-缺陷', + icon: 'iteration',roles:["user"] + }, + hidden:true + }, + { + path: 'record', + component: _import('xm/core/xmRecord/XmRecordForIteration'), + name: 'iterationRecord', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代-日志', + icon: 'iteration',roles:["user"] + }, + hidden:true + }, + { + path: 'workloadDay', + component: _import('xm/core/xmWorkload/WorkloadSetDayList'), + name: 'iterationBudget', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代-工时日报', + icon: 'iteration',roles:["user"] + }, + hidden:true + }, + { + path: 'workloadMonth', + component: _import('xm/core/xmWorkload/WorkloadSetMonthList'), + name: 'iterationWorkloadMonth', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代-工时月报', + icon: 'iteration',roles:["user"] + }, + hidden:true + }, + { + path: 'report', + component: _import('xm/rpt/reportIndexForIteration'), + name: 'iterationReport', + iconCls: 'fa el-icon-menu', + meta: { + title: '迭代-效能', + icon: 'iteration',roles:["user"] + }, + hidden:true + }, + + ] + }, { path: '/xm/core/testCasedbRoute', component: _import('xm/core/xmTestCasedb/XmTestCasedbRoute'), name: 'XmTestCasedbRoute', meta: { title: '测试库管理',roles:["user"] },hidden:true}, { path: '/xm/core', diff --git a/src/store/getters.js b/src/store/getters.js index f440e84b..ce55f5ba 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -23,5 +23,6 @@ const getters = { noticeMsg:state=>state.noticeMsg.noticeMsg, projectInfo:state=>state.projectInfo.projectInfo, xmProduct:state=>state.xmProduct.xmProduct, + xmIteration:state=>state.xmIteration.xmIteration, } export default getters diff --git a/src/store/index.js b/src/store/index.js index 40bec4bc..bef0efcd 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -8,7 +8,7 @@ import user from './modules/user' import noticeMsg from './modules/noticeMsg' import projectInfo from './modules/projectInfo' import xmProduct from './modules/xmProduct' -import iterationInfo from './modules/iterationInfo' +import xmIteration from './modules/xmIteration' import getters from './getters' @@ -24,7 +24,7 @@ const store = new Vuex.Store({ noticeMsg, projectInfo, xmProduct, - iterationInfo, + xmIteration, }, getters }) diff --git a/src/store/modules/iterationInfo.js b/src/store/modules/iterationInfo.js deleted file mode 100644 index f55328ea..00000000 --- a/src/store/modules/iterationInfo.js +++ /dev/null @@ -1,29 +0,0 @@ - -var key='xm-iteration-info'; -const iterationInfo = { - state: { - iterationInfo: null, - }, - mutations: { - SET_ITERATION_INFO: (state, iterationInfo) => { - state.iterationInfo=iterationInfo - if(iterationInfo && iterationInfo!='null' && iterationInfo!='undefined' ){ - sessionStorage.setItem(key,JSON.stringify(iterationInfo)) - }else{ - sessionStorage.removeItem(key) - } - - } - }, - actions: { - setIterationInfo({ commit }, iterationInfo) { - commit('SET_ITERATION_INFO', iterationInfo) - } - } -} -var iterationStr=sessionStorage.getItem(key) -if(iterationStr && iterationStr!='null' && iterationStr!='undefined' ){ - iterationInfo.state.iterationInfo=JSON.parse(iterationStr) -} - -export default iterationInfo diff --git a/src/store/modules/xmIteration.js b/src/store/modules/xmIteration.js new file mode 100644 index 00000000..c2efcc49 --- /dev/null +++ b/src/store/modules/xmIteration.js @@ -0,0 +1,29 @@ + +var key='xm-iteration'; +const xmIteration = { + state: { + xmIteration: null, + }, + mutations: { + SET_XM_ITERATION: (state, xmIteration) => { + state.xmIteration=xmIteration + if(xmIteration && xmIteration!='null' && xmIteration!='undefined' ){ + sessionStorage.setItem(key,JSON.stringify(xmIteration)) + }else{ + sessionStorage.removeItem(key) + } + + } + }, + actions: { + setXmIteration({ commit }, xmIteration) { + commit('SET_XM_ITERATION', xmIteration) + } + } +} +var iterationStr=sessionStorage.getItem(key) +if(iterationStr && iterationStr!='null' && iterationStr!='undefined' ){ + xmIteration.state.xmIteration=JSON.parse(iterationStr) +} + +export default xmIteration diff --git a/src/views/xm/core/xmIteration/XmIterationMng.vue b/src/views/xm/core/xmIteration/XmIterationMng.vue index ca8edfbc..db5eb112 100644 --- a/src/views/xm/core/xmIteration/XmIterationMng.vue +++ b/src/views/xm/core/xmIteration/XmIterationMng.vue @@ -314,6 +314,7 @@ import { mapGetters } from "vuex"; import XmIterationSelect from "@/views/xm/core/components/XmIterationSelect.vue"; import XmProductSelect from "@/views/xm/core/components/XmProductSelect.vue"; import { addUserFocus, delUserFocus } from "@/api/mdp/sys/userFocus"; +import store from '@/store' export default { computed: { ...mapGetters(["userInfo", "roles"]), @@ -598,12 +599,14 @@ export default { //进入info界面 intoInfo(row) { this.editForm = row; - localStorage.setItem("xm-iteration-info-route", JSON.stringify(row)); - this.$router.push({ - name: "XmIterationInfoRoute", - query: { id: row.id }, - }); - //this.showInfo = true; + store.dispatch('setXmIteration',row).then(res=>{ + this.$router.push({ + path:'/xm/core/iteration/overview', + query:{ + iterationId:row.id + } + }) + }) }, //选择行xmIteration selsChange: function (sels) { diff --git a/src/views/xm/core/xmIteration/XmIterationOverviewComplex.vue b/src/views/xm/core/xmIteration/XmIterationOverviewComplex.vue index 407df3ed..7650f13b 100644 --- a/src/views/xm/core/xmIteration/XmIterationOverviewComplex.vue +++ b/src/views/xm/core/xmIteration/XmIterationOverviewComplex.vue @@ -2,7 +2,7 @@
@@ -262,7 +262,7 @@ - + 迭代概览 diff --git a/src/views/xm/core/xmIteration/top-nav.vue b/src/views/xm/core/xmIteration/top-nav.vue index 15723f8e..7ab31425 100644 --- a/src/views/xm/core/xmIteration/top-nav.vue +++ b/src/views/xm/core/xmIteration/top-nav.vue @@ -11,7 +11,7 @@ active-text-color="#409eff" :router="true" > - + 缺陷 + 效能 diff --git a/src/views/xm/core/xmMenu/XmMenuBox.vue b/src/views/xm/core/xmMenu/XmMenuBox.vue index 7a6edfce..30efbc9c 100644 --- a/src/views/xm/core/xmMenu/XmMenuBox.vue +++ b/src/views/xm/core/xmMenu/XmMenuBox.vue @@ -42,6 +42,12 @@ this.filters.xmProduct=this.xmProduct }, deep:true, + }, + xmIteration:{ + handler(){ + this.filters.xmProduct={id:this.xmIteration.productId,productName:this.xmIteration.productName} + }, + deep:true, } }, data() { diff --git a/src/views/xm/core/xmMenu/XmMenuBoxForIteration.vue b/src/views/xm/core/xmMenu/XmMenuBoxForIteration.vue new file mode 100644 index 00000000..49089393 --- /dev/null +++ b/src/views/xm/core/xmMenu/XmMenuBoxForIteration.vue @@ -0,0 +1,48 @@ + + + + + \ No newline at end of file diff --git a/src/views/xm/core/xmMenu/XmMenuBoxForProduct.vue b/src/views/xm/core/xmMenu/XmMenuBoxForProduct.vue index 23f8fdc4..d6c373cd 100644 --- a/src/views/xm/core/xmMenu/XmMenuBoxForProduct.vue +++ b/src/views/xm/core/xmMenu/XmMenuBoxForProduct.vue @@ -1,6 +1,6 @@ diff --git a/src/views/xm/core/xmMenu/XmMenuBoxForProject.vue b/src/views/xm/core/xmMenu/XmMenuBoxForProject.vue index cfca3eda..18d4b6e5 100644 --- a/src/views/xm/core/xmMenu/XmMenuBoxForProject.vue +++ b/src/views/xm/core/xmMenu/XmMenuBoxForProject.vue @@ -1,6 +1,6 @@ diff --git a/src/views/xm/core/xmMenu/XmMenuSelect.vue b/src/views/xm/core/xmMenu/XmMenuSelect.vue index ba64d0d3..39eb6074 100644 --- a/src/views/xm/core/xmMenu/XmMenuSelect.vue +++ b/src/views/xm/core/xmMenu/XmMenuSelect.vue @@ -6,7 +6,7 @@ - + diff --git a/src/views/xm/core/xmProduct/top-nav.vue b/src/views/xm/core/xmProduct/top-nav.vue index 4492e7cc..8888a4b0 100644 --- a/src/views/xm/core/xmProduct/top-nav.vue +++ b/src/views/xm/core/xmProduct/top-nav.vue @@ -49,7 +49,7 @@ 项目 - + 需求 diff --git a/src/views/xm/core/xmProject/top-nav.vue b/src/views/xm/core/xmProject/top-nav.vue index d289a154..25eecaa5 100644 --- a/src/views/xm/core/xmProject/top-nav.vue +++ b/src/views/xm/core/xmProject/top-nav.vue @@ -46,7 +46,7 @@ 产品 - + 需求 diff --git a/src/views/xm/core/xmQuestion/XmQuestionEdit.vue b/src/views/xm/core/xmQuestion/XmQuestionEdit.vue index 5bc400d9..23d0740e 100644 --- a/src/views/xm/core/xmQuestion/XmQuestionEdit.vue +++ b/src/views/xm/core/xmQuestion/XmQuestionEdit.vue @@ -182,7 +182,7 @@ - + @@ -244,7 +244,7 @@ } }, - props:['xmQuestion','visible',"selProject",'opType','xmProduct','xmTestCase','xmTestPlanCase','xmMenu'], + props:['xmQuestion','visible',"selProject",'opType','xmProduct','xmTestCase','xmTestPlanCase','xmMenu','xmIteration'], watch: { 'xmQuestion':function( xmQuestion ) { this.editForm = {...xmQuestion}; diff --git a/src/views/xm/core/xmQuestion/XmQuestionForIteration.vue b/src/views/xm/core/xmQuestion/XmQuestionForIteration.vue new file mode 100644 index 00000000..6ecdca9a --- /dev/null +++ b/src/views/xm/core/xmQuestion/XmQuestionForIteration.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/src/views/xm/core/xmQuestion/XmQuestionMng.vue b/src/views/xm/core/xmQuestion/XmQuestionMng.vue index 8db72838..0f390c80 100644 --- a/src/views/xm/core/xmQuestion/XmQuestionMng.vue +++ b/src/views/xm/core/xmQuestion/XmQuestionMng.vue @@ -211,12 +211,12 @@ - + - + @@ -408,6 +408,7 @@ }, //获取列表 XmQuestion xm_question getXmQuestions() { + debugger; let params = { pageSize: this.pageInfo.pageSize, pageNum: this.pageInfo.pageNum, @@ -1059,10 +1060,10 @@ }, mounted() { if(this.selProject){ - this.filters.selProject=this.selProject + this.filters.selProject={...this.selProject} } if(this.xmProduct){ - this.filters.product=this.xmProduct + this.filters.product={...this.xmProduct} } if(this.queryScene=='my'){ this.filters.handlerUserid=this.userInfo.userid; diff --git a/src/views/xm/core/xmRecord/XmRecordForIteration.vue b/src/views/xm/core/xmRecord/XmRecordForIteration.vue new file mode 100644 index 00000000..3eb2771b --- /dev/null +++ b/src/views/xm/core/xmRecord/XmRecordForIteration.vue @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file diff --git a/src/views/xm/core/xmTask/XmTaskAdd.vue b/src/views/xm/core/xmTask/XmTaskAdd.vue index a44b6c87..231b278c 100644 --- a/src/views/xm/core/xmTask/XmTaskAdd.vue +++ b/src/views/xm/core/xmTask/XmTaskAdd.vue @@ -215,7 +215,7 @@ - + @@ -271,7 +271,7 @@ } } }, - props:['xmTask','visible','xmProject','xmProduct',"parentTask","ptype"], + props:['xmTask','visible','xmProject','xmProduct',"parentTask","ptype",'xmIteration'], watch: { 'xmTask':function( xmTask ) { }, @@ -336,6 +336,20 @@ }, //新增提交XmTask xm_task 父组件监听@submit="afterAddSubmit" addSubmit: function () { + if(this.xmIteration && this.xmIteration.id){ + if(!this.addForm.menuId){ + this.$notify({position:'bottom-left',showClose:true,message:'在迭代视图中添加任务需要关联需求!请选择需求',type: 'error'}) + this.menuVisible=true; + return; + } + } + if(this.xmProduct && this.xmProduct.id){ + if(!this.addForm.menuId){ + this.$notify({position:'bottom-left',showClose:true,message:'在产品视图中添加任务需要关联需求!请选择需求',type: 'error'}) + this.menuVisible=true; + return; + } + } this.$refs.addForm.validate((valid) => { if (valid) { if(this.addForm.oshare==='1'){ diff --git a/src/views/xm/core/xmTask/XmTaskEdit.vue b/src/views/xm/core/xmTask/XmTaskEdit.vue index 23877a3d..605a5a67 100644 --- a/src/views/xm/core/xmTask/XmTaskEdit.vue +++ b/src/views/xm/core/xmTask/XmTaskEdit.vue @@ -508,7 +508,7 @@ - + @@ -639,7 +639,7 @@ } }, - props:['xmTask','visible','xmProject',"parentTask"], + props:['xmTask','visible','xmProject',"parentTask",'xmIteration'], watch: { 'xmTask':function( xmTask ) { }, diff --git a/src/views/xm/core/xmTask/XmTaskListForIteration.vue b/src/views/xm/core/xmTask/XmTaskListForIteration.vue new file mode 100644 index 00000000..1830f87b --- /dev/null +++ b/src/views/xm/core/xmTask/XmTaskListForIteration.vue @@ -0,0 +1,50 @@ + + + + + \ No newline at end of file diff --git a/src/views/xm/core/xmTask/XmTaskMng.vue b/src/views/xm/core/xmTask/XmTaskMng.vue index bf8d6892..1da66263 100644 --- a/src/views/xm/core/xmTask/XmTaskMng.vue +++ b/src/views/xm/core/xmTask/XmTaskMng.vue @@ -685,6 +685,7 @@ :xm-project="currentProject" :xm-product="xmProduct" :xm-task="addForm" + :xm-iteration="xmIteration" :parent-task="parentTask" :ptype="ptype" :visible="addFormVisible" diff --git a/src/views/xm/rpt/reportIndexForIteration.vue b/src/views/xm/rpt/reportIndexForIteration.vue new file mode 100644 index 00000000..3cec0c80 --- /dev/null +++ b/src/views/xm/rpt/reportIndexForIteration.vue @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file