Browse Source

优化

master
陈裕财 4 years ago
parent
commit
3ad6ea1355
  1. 48
      src/views/xm/core/xmMenuWorkItem/XmSubBugList.vue
  2. 43
      src/views/xm/core/xmMenuWorkItem/XmSubMenuList.vue
  3. 9
      src/views/xm/core/xmMenuWorkItem/XmSubTaskList.vue
  4. 2
      src/views/xm/core/xmTask/XmTaskMng.vue

48
src/views/xm/core/xmMenuWorkItem/XmSubBugList.vue

@ -15,8 +15,12 @@
<el-table-column prop="id" label="缺陷编号" width="100px" show-overflow-tooltip=""> <el-table-column prop="id" label="缺陷编号" width="100px" show-overflow-tooltip="">
</el-table-column> </el-table-column>
<el-table-column prop="name" label="名称" min-width="150px">
<el-table-column prop="name" label="名称" min-width="250px">
<template slot-scope="scope">
<div class="icon" style="background-color: #F56C6C;">
<i class="el-icon-warning"></i>
</div>{{scope.row.id}}&nbsp;&nbsp;{{scope.row.name}}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="bugStatus" label="状态" width="100"> <el-table-column prop="bugStatus" label="状态" width="100">
@ -79,6 +83,23 @@
</el-table> </el-table>
</el-row> </el-row>
<xm-group-dialog ref="xmGroupDialog" :sel-project=" {id:linkProjectId} " :is-select-single-user="1" @user-confirm="onUserConfirm"></xm-group-dialog> <xm-group-dialog ref="xmGroupDialog" :sel-project=" {id:linkProjectId} " :is-select-single-user="1" @user-confirm="onUserConfirm"></xm-group-dialog>
<el-dialog :title="'新增缺陷'" :visible.sync="addFormVisible" append-to-body modal-append-to-body>
<el-form :model="addForm" :rules="addFormRules">
<el-form-item>
<template slot="label">
<div class="icon" style="background-color: #F56C6C;">
<i class="el-icon-warning"></i>
</div>
缺陷名称
</template>
<el-input v-model="addForm.name" autocomplete="off" ></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="addFormVisible = false"> </el-button>
<el-button type="primary" @click="addXmBug"> </el-button>
</div>
</el-dialog>
</el-row> </el-row>
</template> </template>
@ -125,6 +146,13 @@ export default {
load:{edit:false,list:false,add:false,del:false,}, load:{edit:false,list:false,add:false,del:false,},
xmBugs:[], xmBugs:[],
editForm:null, editForm:null,
addForm:{name:''},
addFormVisible:false,
addFormRules:{
name:[
{required:true,message:'名称不能为空',trigger:'change'}
]
},
sels:[], sels:[],
dicts:{ dicts:{
priority:[], priority:[],
@ -169,8 +197,8 @@ export default {
this.getXmBugs(); this.getXmBugs();
} }
}, },
addXmBug(name){
var question={name:name,menuId:this.parentXmMenu.menuId,menuName:this.parentXmMenu.menuName,productId:this.parentXmMenu.productId,iterationId:this.parentXmMenu.iterationId,iterationName:this.parentXmMenu.iterationName}
addXmBug(){
var question={menuId:this.parentXmMenu.menuId,menuName:this.parentXmMenu.menuName,productId:this.parentXmMenu.productId,iterationId:this.parentXmMenu.iterationId,iterationName:this.parentXmMenu.iterationName}
question.priority='3' question.priority='3'
question.verNum=this.parentXmMenu.sinceVersion; question.verNum=this.parentXmMenu.sinceVersion;
question.pverNum=this.parentXmMenu.sinceVersion; question.pverNum=this.parentXmMenu.sinceVersion;
@ -178,7 +206,7 @@ export default {
question.askUsername=this.userInfo.username question.askUsername=this.userInfo.username
question.qtype="1" question.qtype="1"
question.id=null; question.id=null;
question.name=name
question.name=this.addForm.name
question.projectId=this.linkProjectId question.projectId=this.linkProjectId
question.bugStatus="1" question.bugStatus="1"
addXmQuestion(question).then((res) => { addXmQuestion(question).then((res) => {
@ -186,20 +214,14 @@ export default {
var tips=res.data.tips; var tips=res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.$emit('submit',res.data.data);// @submit="afterAddSubmit" this.$emit('submit',res.data.data);// @submit="afterAddSubmit"
this.addFormVisible=false;
this.xmBugs.push(res.data.data) this.xmBugs.push(res.data.data)
} }
this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' }); this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.edit=false); }).catch( err => this.load.edit=false);
}, },
showAdd() { showAdd() {
this.$prompt('请输入缺陷标题', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
this.addXmBug(value);
}).catch(() => {
});
this.addFormVisible=true;
}, },
batchDel: function () { batchDel: function () {

43
src/views/xm/core/xmMenuWorkItem/XmSubMenuList.vue

@ -83,6 +83,25 @@
</tag-dialog> </tag-dialog>
<xm-group-dialog ref="xmGroupDialog" :isSelectSingleUser="true" :sel-project="linkProjectId?{id:linkProjectId}:null" :xm-product="parentXmMenu&&parentXmMenu.productId?{id:parentXmMenu.productId}:null" @user-confirm="onGroupUserSelect"> <xm-group-dialog ref="xmGroupDialog" :isSelectSingleUser="true" :sel-project="linkProjectId?{id:linkProjectId}:null" :xm-product="parentXmMenu&&parentXmMenu.productId?{id:parentXmMenu.productId}:null" @user-confirm="onGroupUserSelect">
</xm-group-dialog> </xm-group-dialog>
<el-dialog :title="'新增'+calcMenuLabel.label" :visible.sync="addFormVisible" append-to-body modal-append-to-body>
<el-form :model="addForm" :rules="addFormRules">
<el-form-item>
<template slot="label">
<div class="icon" :style="{backgroundColor: calcMenuLabel.color }">
<i :class="calcMenuLabel.icon"></i>
</div>
{{calcMenuLabel.label}}名称
</template>
<el-input v-model="addForm.menuName" autocomplete="off" ></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="addFormVisible = false"> </el-button>
<el-button type="primary" @click="addXmTask"> </el-button>
</div>
</el-dialog>
</section> </section>
</template> </template>
@ -130,7 +149,14 @@ export default {
return{ return{
load:{edit:false,list:false,add:false,del:false}, load:{edit:false,list:false,add:false,del:false},
xmMenus:[], xmMenus:[],
editForm:{},
editForm:{menuName:''},
addForm:{menuName:''},
addFormVisible:false,
addFormRules:{
menuName:[
{required:true,message:'名称不能为空',trigger:'change'}
]
},
dicts:{}, dicts:{},
sels:[], sels:[],
@ -248,7 +274,7 @@ export default {
this.getXmMenus(); this.getXmMenus();
} }
}, },
addXmMenu(name){
addXmMenu( ){
var menu={...this.parentXmMenu} var menu={...this.parentXmMenu}
menu.mmUserid=this.userInfo.userid menu.mmUserid=this.userInfo.userid
menu.mmUsername=this.userInfo.username menu.mmUsername=this.userInfo.username
@ -257,27 +283,22 @@ export default {
menu.pmenuName=this.parentXmMenu.menuName menu.pmenuName=this.parentXmMenu.menuName
menu.dclass=(parseInt(this.parentXmMenu.dclass)+1)+''; menu.dclass=(parseInt(this.parentXmMenu.dclass)+1)+'';
menu.menuId=null; menu.menuId=null;
menu.menuName=name
menu.menuName=this.addForm.menuName
addXmMenu(menu).then((res) => { addXmMenu(menu).then((res) => {
this.load.edit=false this.load.edit=false
var tips=res.data.tips; var tips=res.data.tips;
if(tips.isOk){ if(tips.isOk){
this.$emit('add-submit',res.data.data);// @submit="afterAddSubmit" this.$emit('add-submit',res.data.data);// @submit="afterAddSubmit"
this.addFormVisible=false;
this.xmMenus.push(res.data.data) this.xmMenus.push(res.data.data)
} }
this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' }); this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' });
}).catch( err => this.load.edit=false); }).catch( err => this.load.edit=false);
}, },
showAdd() { showAdd() {
this.$prompt('请输入标题', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
this.addXmMenu(value);
}).catch(() => {
});
this.addForm.menuName=this.parentXmMenu.menuName+'---请修改'
this.addFormVisible=true;
}, },
editXmMenuSomeFields(row,fieldName,$event){ editXmMenuSomeFields(row,fieldName,$event){

9
src/views/xm/core/xmMenuWorkItem/XmSubTaskList.vue

@ -15,7 +15,7 @@
<el-table-column type="selection" label="全选"></el-table-column> <el-table-column type="selection" label="全选"></el-table-column>
<el-table-column prop="name" label="名称"> <el-table-column prop="name" label="名称">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="icon" :style="{backgroundColor: scope.row.ntype==='1'?'#E6A23C':'#409EFF'}">
<div class="icon" :style="{backgroundColor: scope.row.ntype==='1'?'#E6A23C':'#1CC7EA'}">
<i :class="scope.row.ntype==='1'?'el-icon-odometer':'el-icon-s-operation'" ></i> <i :class="scope.row.ntype==='1'?'el-icon-odometer':'el-icon-s-operation'" ></i>
</div> {{scope.row.name}} </div> {{scope.row.name}}
</template> </template>
@ -87,6 +87,13 @@
<el-dialog title="新增任务" :visible.sync="addFormVisible" append-to-body modal-append-to-body> <el-dialog title="新增任务" :visible.sync="addFormVisible" append-to-body modal-append-to-body>
<el-form :model="addForm" :rules="addFormRules"> <el-form :model="addForm" :rules="addFormRules">
<el-form-item label="任务名称"> <el-form-item label="任务名称">
<template slot="label">
<div class="icon" style="background-color: #1CC7EA;">
<i class="el-icon-s-operation"></i>
</div>
任务名称
</template>
<el-input v-model="addForm.name" autocomplete="off" ></el-input> <el-input v-model="addForm.name" autocomplete="off" ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>

2
src/views/xm/core/xmTask/XmTaskMng.vue

@ -1741,7 +1741,7 @@ export default {
projectId=this.parentTask.projectId projectId=this.parentTask.projectId
}else{ }else{
projectId=this.filters.selProject.id projectId=this.filters.selProject.id
}
}
}else{ }else{
if(this.parentTask && this.parentTask.id){ if(this.parentTask && this.parentTask.id){
productId=this.parentTask.productId productId=this.parentTask.productId

Loading…
Cancel
Save