@ -157,57 +157,45 @@
row - key = "id"
row - key = "id"
ref = "table"
ref = "table"
>
>
< el -table -column sortable prop = "name" label = "任务名称(点击详情)" min -width = " 240 " show -overflow -tooltip >
< el -table -column sortable prop = "name" label = "任务名称(点击详情)" min -width = " 440 " >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
< span >
< span >
{ { scope . row . sortLevel } } & nbsp ;
{ { scope . row . sortLevel } } & nbsp ;
< el -dropdown @command ="handleCommand" v-if =" isTaskCenter!='1' && isMy!='1'" >
< span class = "el-dropdown-link" >
< el -button size = "mini" circle > < i class = "el-icon-plus" > < / i > < / e l - b u t t o n >
< / span >
< el -dropdown -menu slot = "dropdown" >
< el -dropdown -item :command ="{type:'showMenu',data:scope.row}" > + 由故事创建子任务 ( 推荐 ) < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'showSubAdd',data:scope.row}" > + 子任务 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'showTaskTemplate',data:scope.row}" > + 从模板批量导入子任务 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'handleDel',data:scope.row}" icon = "el-icon-delete" > 删除 < / e l - d r o p d o w n - i t e m >
< / e l - d r o p d o w n - m e n u >
< / e l - d r o p d o w n >
< el -tag v-if ="scope.row.level<='2'" type="info" > 轻微 < / el -tag >
< el -tag v-if ="scope.row.level<='2'" type="info" > 轻微 < / el -tag >
< el -tag v -else -if = " scope.row.level = = ' 3 ' " type = "warning" > 一般 < / e l - t a g >
< el -tag v -else -if = " scope.row.level = = ' 3 ' " type = "warning" > 一般 < / e l - t a g >
< el -tag v -else -if = " scope.row.level = = ' 4 ' " type = "danger" > 紧急 < / e l - t a g >
< el -tag v -else -if = " scope.row.level = = ' 4 ' " type = "danger" > 紧急 < / e l - t a g >
< el -tag v -else type = "danger" > 特急 < / e l - t a g >
< el -tag v -else type = "danger" > 特急 < / e l - t a g >
< span v-for ="(item ,index) in [formatExeUsernames(scope.row)]" :key ="index" >
< el -tooltip :content ="item.exeUsernames" > < el -link :type ="item.type" @click.stop ="showExecusers(scope.row)" > { { item . showMsg } } < / e l - l i n k > < / e l - t o o l t i p >
< / span >
< el -tooltip content = "进度" > < el -link style = "border-radius:30px;" :type ="scope.row.rate>=100?'success':'warning'" @click ="drawerVisible=true" > {{ ( scope.row.rate ! = null ? scope.row.rate : 0 ) + ' % ' }} < / el -link > < / e l - t o o l t i p >
< el -tooltip content = "预算金额、工时" > < el -tag type = "info" > { { parseFloat ( scope . row . budgetCost / 10000 ) . toFixed ( 2 ) } } 万 , { { scope . row . budgetWorkload } } 人时 < / e l - t a g > < / e l - t o o l t i p >
< el -link type = "primary" @click.stop ="showDrawer(scope.row)" > { { scope . row . name } } < / e l - l i n k >
< el -link type = "primary" @click.stop ="showDrawer(scope.row)" > { { scope . row . name } } < / e l - l i n k >
< / span >
< / span >
< span > < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "menuId" label = "故事" min -width = " 120 " show -overflow -tooltip >
< template slot = "header" >
故事 < el -button @click ="showMenuStory" icon = "el-icon-search" circle size = "mini" > < / e l - b u t t o n >
< / template >
< template slot -scope = " scope " >
< el -link @click.stop ="toMenu(scope.row)" > { { scope . row . menuName ? scope . row . menuName : '去关联故事' } } < / e l - l i n k >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column sortable label = "预算" prop = "budgetCost" width = "120" >
< template slot -scope = " scope " >
< div > { { parseFloat ( scope . row . budgetCost / 10000 ) . toFixed ( 2 ) } } 万 , { { scope . row . budgetWorkload } } 人时 < / div >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "责任人" prop = "createUserid" min -width = " 120 " show -overflow -tooltip >
< template slot = "header" >
责任人 < el -button @click ="showMenuGroupUser" icon = "el-icon-search" circle size = "mini" > < / e l - b u t t o n >
< / template >
< template slot -scope = " scope " >
< el -link v-if ="scope.row.createUserid!=null && scope.row.createUserid !='' " @click.stop="showGroupUserSelect(scope.row)" > {{ scope.row.createUsername }} < / el -link >
< el -link type = "warning" v -if = " scope.row.createUsername = = null | | scope.row.createUsername = = ' ' " @click.stop ="showGroupUserSelect(scope.row)" > 去设置 < / e l - l i n k >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "执行人" prop = "exeUserids" width = "120" show -overflow -tooltip >
< template slot = "header" >
执行人 < el -button @click ="showMenuExecutor" icon = "el-icon-search" circle size = "mini" > < / e l - b u t t o n >
< / template >
< template slot -scope = " scope " >
< el -link type = "danger" v-if ="scope.row.exeUsernames!=null && scope.row.exeUsernames !='' && scope.row.exeUsernames.indexOf('验收不过')>=0" @click.stop="showExecusers(scope.row)" > {{ scope.row.exeUsernames }} < / el -link >
< el -link type = "success" v -else -if = " scope.row.exeUsernames ! = null & & scope.row.exeUsernames ! = ' ' & & scope.row.exeUsernames.indexOf ( ' 已验收 ' ) > = 0 " @click.stop=" showExecusers ( scope . row ) " > { { scope . row . exeUsernames } } < / e l - l i n k >
< el -link type = "info" v -else -if = " scope.row.exeUsernames ! = null & & scope.row.exeUsernames ! = ' ' " @click.stop ="showExecusers(scope.row)" > { { scope . row . exeUsernames } } < / e l - l i n k >
< el -link type = "primary" v -if = " scope.row.exeUsernames = = null | | scope.row.exeUsernames = = ' ' " @click.stop ="showExecusers(scope.row)" > 去抢任务 < / e l - l i n k >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column sortable prop = "rate" label = "进度" width = "100" >
< template slot -scope = " scope " >
< div >
< el -tag style = "border-radius:30px;" :type ="scope.row.rate>=100?'success':'warning'" > { { ( scope . row . rate != null ? scope . row . rate : 0 ) + '%' } } < / e l - t a g >
< / div >
< font class = "align-right" >
<!--
< span >
< el -tooltip content = "点击设置责任人" > < el -link v-if ="scope.row.createUserid!=null && scope.row.createUserid !='' " @click.stop="showGroupUserSelect(scope.row)" > {{ scope.row.createUsername }} < / el -link > < / e l - t o o l t i p >
< el -tooltip content = "点击设置责任人" > < el -link type = "warning" v -if = " scope.row.createUsername = = null | | scope.row.createUsername = = ' ' " @click.stop ="showGroupUserSelect(scope.row)" > 去设置 < / e l - l i n k > < / e l - t o o l t i p >
< / span >
-- >
< span >
< / span >
< / font >
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< el -table -column sortable prop = "startTime" label = "任务起止时间" width = "300" >
< el -table -column sortable prop = "startTime" label = "任务起止时间" width = "300" >
@ -224,54 +212,12 @@
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
<!--
< el -table -column label = "外购" prop = "taskOut" width = "80" >
< template slot -scope = " scope " >
< el -checkbox :disabled ="true" v -model = " scope.row.taskOut " :false-label ="0" :true-label ="1" > < / e l - c h e c k b o x >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "结算方案" prop = "settleSchemel" width = "120" :formatter ="formatterOption" >
< / e l - t a b l e - c o l u m n >
-- >
< el -table -column label = "任务技能需求" prop = "taskSkillNames" min -width = " 120 " show -overflow -tooltip >
< template slot -scope = " scope " >
< el -link v-if ="scope.row.taskSkillNames!=null && scope.row.taskSkillNames !='' " @click.stop="showSkill(scope.row)" > {{ scope.row.taskSkillNames }} < / el -link >
< el -link v -else @click.stop ="showSkill(scope.row)" type = "primary" > 去补充 < / e l - l i n k >
< el -table -column prop = "menuId" label = "故事" width = "120" show -overflow -tooltip >
< template slot = "header" >
故事 < el -button @click ="showMenuStory" icon = "el-icon-search" circle size = "mini" > < / e l - b u t t o n >
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
<!--
< el -table -column prop = "description" label = "任务描述" min -width = " 160 " >
< / e l - t a b l e - c o l u m n >
-- >
< el -table -column v-if =" isTaskCenter!='1'" header-align="center" fixed="right" label="操作" width="80" >
< template slot -scope = " scope " >
< template slot -scope = " scope " >
<!--
< el -button -group >
< el -button @click.stop ="showSubAdd(scope.row)" type = "primary" > + 子任务 < / e l - b u t t o n >
< el -button @click.stop ="showEdit(scope.row,scope.$index)" type = "primary" > 编辑 < / e l - b u t t o n >
< el -button v-if ="isEmpty(scope.row.children) " type="primary" @click.stop="handleDel(scope.row,scope.$index)" > 删除 < / el -button >
< / e l - b u t t o n - g r o u p >
-- >
< el -dropdown @command ="handleCommand" >
< span class = "el-dropdown-link" >
更多 < i class = "el-icon-setting" > < / i >
< / span >
< el -dropdown -menu slot = "dropdown" >
< el -dropdown -item :command ="{type:'showSubAdd',data:scope.row}" > + 子任务 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'showTaskTemplate',data:scope.row}" > + 从模板批量导入子任务 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'showMenu',data:scope.row}" > + 由故事创建子任务 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'showDrawer',data:scope.row}" > 明细 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'showEdit',data:scope.row}" > 编辑 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'showExecusers',data:scope.row}" > 执行人管理 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'showSkill',data:scope.row}" > 技能管理 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item v-if =" isTaskCenter=='1' && selkey=='myFocus'" :command="{type:'focusOrUnfocus',data:scope.row}" > 取关 < / el -dropdown -item >
< el -dropdown -item v-if =" isTaskCenter=='1' && selkey!='myFocus'" :command="{type:'focusOrUnfocus',data:scope.row}" > 关注 < / el -dropdown -item >
< el -dropdown -item :command ="{type:'showDrawer',data:scope.row}" > 讨论 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'showDrawer',data:scope.row}" > 日志 < / e l - d r o p d o w n - i t e m >
< el -dropdown -item :command ="{type:'handleDel',data:scope.row}" > 删除 < / e l - d r o p d o w n - i t e m >
< / e l - d r o p d o w n - m e n u >
< / e l - d r o p d o w n >
< el -link @click.stop ="toMenu(scope.row)" > { { scope . row . menuName ? scope . row . menuName : '去关联故事' } } < / e l - l i n k >
< / template >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< / e l - t a b l e >
@ -286,17 +232,9 @@
< / e l - r o w >
< / e l - r o w >
< el -dialog
< el -dialog
v - if = "drawerVisible == true"
v - if = "drawerVisible == true"
width = "70% "
width = "600 "
: visible . sync = "drawerVisible" append - to - body >
: visible . sync = "drawerVisible" append - to - body >
<!-- < template slot = "title" >
< div style = "display:flex;" >
< div style = "border-radius:30px;" > 任务状态 < / div >
< / div >
< span > 任务名称 : { { editForm . name } } < / span >
< el -button v-if ="progress_show" @click="progress_show = !progress_show" type="text" > 查看任务明细 < / el -button >
< el -button v-if ="!progress_show" @click="progress_show = !progress_show" type="text" > 查看进度 < / el -button >
< / template > -- >
< div style = "font-size: 12px;overflow-x:hidden" >
< el -row style = "font-size: 12px;overflow-x:hidden" >
< div class = "task-header extra" >
< div class = "task-header extra" >
< div class = "title" >
< div class = "title" >
{ { editForm . name } } < el -tag style = "border-radius:30px;" > { { taskStateList [ parseInt ( editForm . taskState ) ] } } < / e l - t a g >
{ { editForm . name } } < el -tag style = "border-radius:30px;" > { { taskStateList [ parseInt ( editForm . taskState ) ] } } < / e l - t a g >
@ -319,17 +257,23 @@
< div class = "exector extra" >
< div class = "exector extra" >
< div class = "field-label" > 用户故事 < / div > < el -tag v -if = " editForm.menuName " style = "margin-left:10px;border-radius:30px;" > { { editForm . menuName } } < / e l - t a g >
< div class = "field-label" > 用户故事 < / div > < el -tag v -if = " editForm.menuName " style = "margin-left:10px;border-radius:30px;" > { { editForm . menuName } } < / e l - t a g >
< / div >
< / div >
< div class = "progress extra" style = "display:flex; flex-direction:row;" >
< div class = "progress extra" >
< div class = "field-label" > 任务进度 < / div >
< div class = "field-label" > 任务进度 < / div >
< el -input v-model ="editForm.rate" style="width:100px;" type="number" step="10" min="0" max="100" > < / el -input >
< el -button style = "font-size:12px;" @click ="editProgress(editForm.rate)" > 更新进度 < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(20)" > 完成20 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(40)" > 完成40 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(60)" > 完成60 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(80)" > 完成80 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(99)" > 完成99 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(100)" > 完成100 % < / el -button >
< el -row >
< el -slider
v - model = "editForm.rate"
show - input >
< / e l - s l i d e r >
< / e l - r o w >
< el -row >
< el -button @click ="editProgress(editForm.rate)" > 保存进度 < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(20)" > 完成20 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(40)" > 完成40 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(60)" > 完成60 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(80)" > 完成80 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(99)" > 完成99 % < / el -button >
< el -button style = "font-size:12px;" @click ="editProgress(100)" > 完成100 % < / el -button >
< / e l - r o w >
< / div >
< / div >
< div class = "exector extra" >
< div class = "exector extra" >
< div class = "field-label" > 任务负责人 < / div >
< div class = "field-label" > 任务负责人 < / div >
@ -349,38 +293,7 @@
< div class = "extra" >
< div class = "extra" >
< div class = "field-label" > 任务周期 < / div > { { getDateString ( editForm . startTime ) + ' ~ ' + getDateString ( editForm . endTime ) } } 共 { { taskTime } } 天
< div class = "field-label" > 任务周期 < / div > { { getDateString ( editForm . startTime ) + ' ~ ' + getDateString ( editForm . endTime ) } } 共 { { taskTime } } 天
< / div >
< / div >
< div v-if ="editForm.children" class="extra" >
< div class = "field-label" > 子任务 < / div > < el -tag style = "margin-left:10px;border-radius:30px;" v-for ="(item,i) in editForm.children" :key ="i" > {{ item.sortLevel }}{{ item.name }} < / el -tag >
< / div >
< div v -else class = "extra" >
< div class = "field-label" > 子任务 < / div > 无子任务
< / div >
< div class = "extra" >
< div class = "field-label" > 前置任务 < / div > { { ( editForm . preTaskid == '' || editForm . preTaskid == null ) ? '无前置任务' : editForm . preTaskname } }
< / div >
< div class = "extra" >
< div class = "field-label" > 里程碑 < / div > { { editForm . milestone == '0' ? '否' : '是' } }
< / div >
< div class = "extra" >
< div class = "field-label" > 预算金额 < / div > { { editForm . budgetCost } } 元
< / div >
< div class = "extra" >
< div class = "field-label" > 预算工作量 < / div > { { editForm . budgetWorkload } } 人时
< / div >
< div class = "extra" >
< div class = "field-label" > 任务描述 < / div > { { editForm . description } }
< / div >
< div class = "extra" >
< div class = "field-label" > < / div >
< / div >
< el -menu :default-active ="drawerkey" class = "el-menu-demo" mode = "horizontal" @select ="handleSelect" >
< el -menu -item index = "1" > 讨论 < el -tag style = "border-radius:30px;" > 10 < / e l - t a g > < / e l - m e n u - i t e m >
< el -menu -item index = "2" > 操作日志 < el -tag style = "border-radius:30px;" > 10 < / e l - t a g > < / e l - m e n u - i t e m >
< / e l - m e n u >
< / div >
< / e l - r o w >
< div v-if ="drawerkey == '1' && drawerVisible==true" style="overflow-x:hidden" >
< div v-if ="drawerkey == '1' && drawerVisible==true" style="overflow-x:hidden" >
< xm -exchange -mng :xm-task ="editForm" > < / x m - e x c h a n g e - m n g >
< xm -exchange -mng :xm-task ="editForm" > < / x m - e x c h a n g e - m n g >
@ -1763,6 +1676,42 @@ import XmProjectGroupSelect from '../xmProjectGroup/XmProjectGroupSelect.vue';
setFiltersExecutorAsMySelf ( ) {
setFiltersExecutorAsMySelf ( ) {
this . filters . executor = this . userInfo ;
this . filters . executor = this . userInfo ;
this . searchXmTasks ( ) ;
this . searchXmTasks ( ) ;
} ,
formatExeUsernames ( row ) {
var exeUsernames = row . exeUsernames ;
var respons = {
type : 'info' ,
executorUsername : row . executorUsername ,
showMsg : '' ,
exeUsernames : exeUsernames ,
executorUserid : row . executorUserid ,
}
if ( ! row . executorUserid && exeUsernames ) {
var exeStatuss = exeUsernames . split ( "," )
respons . showMsg = exeStatuss . length + "人候选中"
return respons ;
} else if ( ! row . executorUserid && ! exeUsernames ) {
respons . showMsg = "候选中"
return respons ;
}
if ( row . executorUserid && exeUsernames && exeUsernames . length > 0 ) {
var exeStatuss = exeUsernames . split ( "," ) . filter ( i => {
return i . indexOf ( row . executorUsername ) >= 0
} )
if ( exeStatuss . length <= 0 ) {
respons . showMsg = "去设置"
return respons ;
}
respons . showMsg = exeStatuss . join ( "," )
if ( respons . showMsg . indexOf ( '验收不过' ) >= 0 ) {
respons . type = "danger"
} else if ( respons . showMsg . indexOf ( '已验收' ) >= 0 ) {
respons . type = "success"
}
} else {
respons . showMsg = "去设置"
}
return respons
}
}
/**end 自定义函数请在上面加**/
/**end 自定义函数请在上面加**/
@ -1813,70 +1762,16 @@ XmProjectGroupSelect,XmProductSelect
< / script >
< / script >
< style scoped >
< style scoped >
. xm - task {
width : 100 % ;
}
. xm - task > . el - menu - demo {
height : 50 px ;
padding - left : 10 px ;
background : # fafbfc ;
}
. xm - task > . el - menu - demo > li {
height : 100 % ;
line - height : 50 px ;
color : # 303133 ;
}
. xm - task > . el - menu - demo > li : hover {
background : transparent ;
}
. xm - task > . el - menu - demo > . is - active {
background : transparent ;
}
. xm - task - add >>> . el - dialog__body {
padding : 0 20 px ;
}
. xm - task >>> . el - drawer__close - btn {
display : none ! important ;
}
. xm - task >>> . el - drawer__header {
background - color : # fafbfc ;
border - bottom : 1 px solid # efefef ;
padding : 8 px 16 px ;
}
/* .xm-task .progress-form >>> .el-form-item__label{ */
/* line-height: 1.15; */
/* } */
. xm - task >>> . el - drawer__body {
overflow : auto ;
padding : 0 20 px ;
}
. xm - task . el - progress -- without - text {
display : flex ;
align - items : center ;
}
. xm - task >>> . el - progress - bar__inner {
transition : none ! important ;
}
. xm - task . progress - bar {
padding : 10 px 0 ;
}
. xm - task . progress - btn {
line - height : 0 ;
position : absolute ;
top : 7 px ;
}
. xm - task . progress - disable >>> . el - progress - bar__inner {
background - color : # ccc ! important ;
. more - label - font {
text - align : center ;
float : left ;
padding - top : 5 px ;
}
}
small {
font - size : 12 px ;
/* float:right; */
color : # 6 c757d ! important ;
margin - left : 20 px ;
. align - right {
float : right ;
}
}
< / style >
< style lang = "scss" scoped >
. extra {
. extra {
border - bottom : 1 px solid # dedede ;
border - bottom : 1 px solid # dedede ;
@ -1910,18 +1805,4 @@ small{
overflow - y : hidden ;
overflow - y : hidden ;
}
}
. clearfix : : after {
clear : both ;
content : "" ;
}
. more - label - font {
text - align : center ;
float : left ;
padding - top : 5 px ;
}
< / style >
< style lang = "scss" scoped >
< / style >
< / style >