+
{{scope.row.iterationName}}
@@ -322,10 +322,10 @@
选标签
-
+
-
+
{{scope.row.mmUsername}}
@@ -339,8 +339,8 @@
-
-
+
+
@@ -428,7 +428,7 @@
import {sn} from '@/common/js/sequence'
- import { mapGetters } from 'vuex'
+ import { mapGetters } from 'vuex'
export default {
props:['selProject','xmIteration','xmProduct','disabledMng'],
@@ -708,7 +708,7 @@
//显示编辑界面 XmMenu xm_project_menu
showEdit: function ( row,index ) {
- this.editForm = Object.assign({}, row);
+ this.editForm =row
this.editFormVisible = true;
},
//显示新增界面 XmMenu xm_project_menu
@@ -722,7 +722,7 @@
this.addFormVisible = true;
}else if(this.filters.iteration && this.filters.iteration.id){
this.parentMenu=null;
- this.addForm.productId=this.filters.iteration.productId
+ this.addForm.productId=this.filters.iteration.productId
this.addForm.iterationId=this.filters.iteration.id
this.addForm.iterationName=this.filters.iteration.iterationName
this.addForm.dclass=dclass
@@ -735,10 +735,10 @@
//this.addForm=Object.assign({}, this.editForm);
},
showSubAdd:function(row){
-
+
this.addForm={...this.addFormInit}
this.editForm=row
- this.parentMenu=row
+ this.parentMenu=row
this.expandRowKeysCpd.push(row.pmenuId);
this.addForm.productId=row.productId
if(this.filters.product && row.productId==this.filters.product.id){
@@ -747,9 +747,9 @@
this.addForm.productName=null;
}
if(this.filters.iteration && this.filters.iteration.id){
- this.addForm.productId=this.filters.iteration.productId
+ this.addForm.productId=this.filters.iteration.productId
this.addForm.iterationId=this.filters.iteration.id
- this.addForm.iterationName=this.filters.iteration.iterationName
+ this.addForm.iterationName=this.filters.iteration.iterationName
this.addFormVisible = true;
}
this.addFormVisible=true
@@ -757,20 +757,20 @@
showProdcutAdd:function(){
this.$refs.xmProductMng.showAdd();
},
- afterAddSubmit(row){
+ afterAddSubmit(row){
this.addFormVisible=false;
- this.pageInfo.count=true;
- //this.getXmMenus();
+ this.pageInfo.count=true;
+ //this.getXmMenus();
if(!row.pmenuId){
this.xmMenus.push(row);
}
if(this.parentMenu){
this.parentMenu.childrenCnt=this.parentMenu.childrenCnt?this.parentMenu.childrenCnt+1:1;
}
- treeTool.reloadAllChildren(this.$refs.table,this.maps,[row,{...this.parentMenu}],'pmenuId',this.loadXmMenusLazy)
-
+ treeTool.reloadAllChildren(this.$refs.table,this.maps,[row,{...this.parentMenu}],'pmenuId',this.loadXmMenusLazy)
+
this.parentMenu=null;
-
+
},
afterEditSubmit(row){
this.editFormVisible=false;
@@ -1212,12 +1212,12 @@
var tips = res.data.tips;
if(tips.isOk){
if(this.sels.length>0){
- this.sels.forEach(i=>{
+ this.sels.forEach(i=>{
this.fieldTagVisible=false;
- Object.assign(i,params)
+ Object.assign(i,params)
})
}else{
- Object.assign(row,params)
+ Object.assign(row,params)
}
}else{
this.$notify({showClose:true,message:tips.msg,type:tips.isOk?'success':'error'})
@@ -1294,6 +1294,12 @@
}
},
+ onEditSomeFields(params){
+ Object.assign(this.editForm,params)
+ },
+ onAddSubMenu(row){
+ treeTool.reloadAllChildren(this.$refs.table,this.maps,[this.editForm,row],'pmenuId',this.loadXmMenusLazy)
+ }
},//end methods
components: {
@@ -1308,7 +1314,7 @@
UsersSelect,
XmMenuMngBatch,
TagDialog,
- XmMenuSelect,
+ XmMenuSelect,
XmMenuWorkload,
XmTableConfig,
XmGroupDialog,
diff --git a/src/views/xm/core/xmWorkItem/XmSubBugList.vue b/src/views/xm/core/xmWorkItem/XmSubBugList.vue
new file mode 100644
index 00000000..ca2eafa8
--- /dev/null
+++ b/src/views/xm/core/xmWorkItem/XmSubBugList.vue
@@ -0,0 +1,375 @@
+
+
+
+
+
+
+ 缺陷
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+
+ {{formaterByDicts(scope.row,'solution',scope.row.solution)}}
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.handlerUsername}}
+
+
+ 负责人
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/xm/core/xmWorkItem/XmSubMenuList.vue b/src/views/xm/core/xmWorkItem/XmSubMenuList.vue
new file mode 100644
index 00000000..2e6e16d5
--- /dev/null
+++ b/src/views/xm/core/xmWorkItem/XmSubMenuList.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
特性
+
+
+
+
+
+ 用户故事
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/xm/core/xmWorkItem/XmSubTaskList.vue b/src/views/xm/core/xmWorkItem/XmSubTaskList.vue
new file mode 100644
index 00000000..64343000
--- /dev/null
+++ b/src/views/xm/core/xmWorkItem/XmSubTaskList.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+ 任务
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/xm/core/xmWorkItem/XmSubWorkItem.vue b/src/views/xm/core/xmWorkItem/XmSubWorkItem.vue
index 536691dd..0f1c81b0 100644
--- a/src/views/xm/core/xmWorkItem/XmSubWorkItem.vue
+++ b/src/views/xm/core/xmWorkItem/XmSubWorkItem.vue
@@ -1,9 +1,10 @@
- 共{{subWorkItemNum}}个子工作项
+ 共{{subWorkItemNum}}个子工作项
-
+
+
添加特性
@@ -11,71 +12,28 @@
-
+
添加用户故事
-
+
添加任务
-
+
添加缺陷
-
-
-
-
-
特性
-
-
-
-
-
- 用户故事
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 任务
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 缺陷
-
-
-
-
-
-
-
+
+
+
+
+
@@ -84,19 +42,18 @@ import Vue from "vue";
import util from "@/common/js/util"; //全局公共库
import treeTool from "@/common/js/treeTool"; //全局公共库
import { initSimpleDicts } from '@/api/mdp/meta/item'; //下拉框数据查询
-import {
- listXmTask,
-} from "@/api/xm/core/xmTask";
- import { listXmQuestion} from '@/api/xm/core/xmQuestion';
- import { listXmMenu,addXmMenu } from '@/api/xm/core/xmMenu';
import { mapGetters } from 'vuex'
+ import XmSubMenuList from './XmSubMenuList.vue'
+ import XmSubTaskList from './XmSubTaskList.vue'
+ import XmSubBugList from './XmSubBugList.vue'
+ import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect'
export default {
computed: {
- ...mapGetters(["userInfo", "roles"]),
-
- calcMenuLabel(){
+ ...mapGetters(["userInfo", "roles"]),
+
+ calcMenuLabel(){
var params={label:'工作项',icon:'',color:''};
if(this.parentXmMenu.dclass==='0'){
params={label:'史诗',icon:'el-icon-s-promotion',color:'rgb(255, 153, 51)'};
@@ -104,129 +61,77 @@ export default {
params={label:'特性',icon:'el-icon-s-flag',color:'rgb(0, 153, 51)'};
}else if(this.parentXmMenu.dclass==='2'){
params={label:'故事',icon:'el-icon-document',color:' rgb(79, 140, 255)'};
- }
+ }
return params;
- },
+ },
subWorkItemNum(){
var num= this.xmTasks.length+this.xmMenus.length+this.xmBugs.length;
this.$emit('sub-work-item-num',num);
return num;
}
},
- props: [
- 'parentXmMenu'
+ props: [
+ 'parentXmMenu','linkProjectId'
],
- watch: {
+ watch: {
'parentXmMenu.menuId':function(){
this.initData();
}
-
+
},
- data() {
+ data() {
return{
load:{edit:false,list:false,add:false},
xmTasks:[],
xmBugs:[],
xmMenus:[],
+ xmProject:null,
}
}, //end data
methods: {
-
- getXmTasks(){
- listXmTask({menuId:this.parentXmMenu.menuId}).then(res=>{
- var tips = res.data.tips;
- if(tips.isOk){
- this.xmTasks=res.data.data
- }else{
- this.xmTasks=[];
- }
- })
- },
- getXmMenus(){
- listXmMenu({pmenuId:this.parentXmMenu.menuId}).then(res=>{
- var tips = res.data.tips;
- if(tips.isOk){
- this.xmMenus=res.data.data
- }else{
- this.xmMenus=[];
- }
- })
- },
-
- getXmBugs(){
- listXmQuestion({menuId:this.parentXmMenu.menuId}).then(res=>{
- var tips = res.data.tips;
- if(tips.isOk){
- this.xmBugs=res.data.data
- }else{
- this.xmBugs=[];
- }
- })
- },
- initData(){
+ initData(){
this.xmTasks=[]
this.xmMenus=[]
this.xmBugs=[]
- if(!this.parentXmMenu || !this.parentXmMenu.menuId){
- return;
- }
- var dclass=this.parentXmMenu.dclass;
- if(dclass<3){
- this.getXmMenus();
- }else{
- this.getXmTasks();
- this.getXmBugs();
- }
- },
- addXmMenu(name){
- debugger;
- var menu={...this.parentXmMenu}
- menu.mmUserid=this.userInfo.userid
- menu.mmUsername=this.userInfo.username
- menu.seqNo=this.parentXmMenu.seqNo+"."+(parseInt(this.parentXmMenu.childrenCnt)+1)
- menu.pmenuId=this.parentXmMenu.menuId
- menu.pmenuName=this.parentXmMenu.menuName
- menu.dclass=(parseInt(this.parentXmMenu.dclass)+1)+'';
- menu.menuId=null;
- menu.menuName=name
-
- addXmMenu(menu).then((res) => {
- this.load.edit=false
- var tips=res.data.tips;
- if(tips.isOk){
- this.$emit('submit',res.data.data);// @submit="afterAddSubmit"
- this.xmMenus.push(res.data.data)
- }
- this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
- }).catch( err => this.load.edit=false);
},
showAdd(dclass) {
- this.$prompt('请输入标题', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- }).then(({ value }) => {
- if(dclass<4){
- this.addXmMenu(value);
- }else if(dclass==='4'){
- this.addXmTask(value);
- }else if(dclass==='5'){
- this.addXmQuestion(value);
- }
- }).catch(() => {
-
- });
+ if(dclass<4){
+ this.$refs.menuList.showAdd();
+ }else if(dclass==='4'){
+ if(!this.linkProjectId && !this.xmProject){
+ this.$notify({showClose:true,message:'请先选择一个项目',type:'warning'})
+ return;
+ }
+ this.$refs.taskList.showAdd();
+ }else if(dclass==='5'){
+ if(!this.linkProjectId && !this.xmProject){
+ this.$notify({showClose:true,message:'请先选择一个项目',type:'warning'})
+ return;
+ }
+ this.$refs.bugList.showAdd();
+ }
+ },
+ onMenusChange(menus){
+ this.xmMenus=menus
},
+ onBugsChange(bugs){
+ this.xmBugs=bugs
+ },
+ onTasksChange(tasks){
+ this.xmTasks=tasks
+ }
/**end 自定义函数请在上面加**/
}, //end methods
- components: {
+ components: {
+ XmSubMenuList,XmSubTaskList,XmSubBugList,XmProjectSelect
},
- mounted() {
+ mounted() {
this.initData();
},
};
-