@ -2,7 +2,7 @@
< section class = "padding" >
< el -row >
< xm -product -select class = "hidden-md-and-down" :auto-select ="false" @row-click ="onProductSelected" @clear ="onProductClose" > < / xm -product -select >
< el -select v-model ="menukey" @change="handleSelect" clearable style="width:100px ;" >
< el -select v-model ="menukey" @change="handleSelect" clearable style="width:10em ;" >
< el -option value = "all" label = "全部" > < / e l - o p t i o n >
< el -option value = "compete" label = "我参与" > < / e l - o p t i o n >
< el -option value = "leader" label = "我管理" > < / e l - o p t i o n >
@ -13,57 +13,67 @@
< el -option value = "myExecuserStatus1" label = "我执行" > < / e l - o p t i o n >
< el -option value = "myExecuserStatus7" label = "我放弃" > < / e l - o p t i o n >
< / e l - s e l e c t >
< el -select v-model ="filters.status" clearable placeholder="项目状态" style="width:100px;" >
< el -option v-for ="(item,index) in dicts['projectStatus']" :value="item.id" :label="item.name" :key ="index" > < / el -option >
< / e l - s e l e c t >
< mdp -select -dict label = "项目状态" placeholder = "状态" style = "width:10em;" :dict ="dicts['projectStatus']" v-model ="filters.status" > < / mdp -select -dict >
< el -input v -model = " filters.key " style = "width:15% ;" placeholder = "项目 名称模糊 查询" clearable >
< el -input v -model = " filters.key " style = "width:10em;" placeholder = "名称查询" clearable >
< / e l - i n p u t >
< el -button type = "primary" icon = "el-icon-search" @click ="searchXmProjects" > 查询 < / el -button >
< el -popover
placement = "top-start"
title = "更多条件、操作"
width = "5 00"
width = "6 00"
trigger = "click" >
< el -row >
< el -row >
< font class = "more-label-font" > 显示方式 : < / font >
< el -radio v-model ="showType" :label ="false" > 表格 < / el -radio >
< el -radio v-model ="showType" :label ="true" > 卡片 < / el -radio >
< / e l - r o w >
< el -row >
< el -descriptions class = "margin-top" size = "mini" :column ="1" border >
< template slot = "extra" >
< el -button type = "text" @click ="templateVisible=!templateVisible" > {{ templateVisible ? ' 隐藏模板 ' : ' 显示模板 ' }} < / el -button >
< el -button type = "text" @click ="guiderStart(true)" icon = "el-icon-help" > 新手导航 < / e l - b u t t o n >
< / e l - r o w >
< el -divider > < / e l - d i v i d e r >
< el -row v-if ="filters.productId" >
< font class = "more-label-font" > 项目 : < / font >
< el -button type = "primary" style = "float:right;" @click ="searchXmProjects" icon = "el-icon-search" > 查询 < / e l - b u t t o n >
< / template >
< el -descriptions -item >
< template slot = "label" >
< i class = "el-icon-time" > < / i >
显示方式
< / template >
< el -radio v-model ="showType" :label ="false" > 表格 < / el -radio >
< el -radio v-model ="showType" :label ="true" > 卡片 < / el -radio >
< / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item >
< template slot = "label" >
< i class = "el-icon-document" > < / i >
选择产品
< / template >
< xm -product -select style = "display:inline;" :auto-select ="false" @row-click ="onProductSelected" @clear ="onProductClose" > < / xm -product -select >
< / e l - r o w >
< el -row >
< font class = "more-label-font" > 项目编号 : < / font >
< el -input v-model ="filters.id" clearable style="width:200px;" > < / el -input >
< / e l - r o w >
< el -row >
< font class = "more-label-font" > 创建时间 : < / font >
< el -date -picker
v - model = "dateRanger"
< / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item :span ="2" >
< template slot = "label" >
< i class = "el-icon-watch-1" > < / i >
创建时间
< / template >
< mdp -date -range
v - model = "filters"
type = "daterange"
align = "right"
start - key = "createTimeStart"
end - key = "createTimeEnd"
unlink - panels
range - separator = "至"
start - placeholder = "开始日期"
end - placeholder = "完成日期"
value - format = "yyyy-MM-dd HH:mm:ss"
: default - time = "['00:00:00', '23:59:59']"
: picker - options = "pickerOptions"
> < / e l - d a t e - p i c k e r >
< / e l - r o w >
< el -row >
< el -button style = "float:right;" type = "primary" icon = "el-icon-search" @click ="searchXmProjects" > 查询 < / el -button >
< / e l - r o w >
< / e l - r o w >
: auto - default = "false"
key = "planEndTime"
> < / m d p - d a t e - r a n g e >
< / e l - d e s c r i p t i o n s - i t e m >
< el -descriptions -item >
< template slot = "label" >
< i class = "el-icon-document" > < / i >
项目编号
< / template >
< el -input v-model ="filters.id" clearable style="width:100%;" > < / el -input >
< / e l - d e s c r i p t i o n s - i t e m >
< / e l - d e s c r i p t i o n s >
< el -button slot = "reference" icon = "el-icon-more" id = "prj-more-btn" > < / e l - b u t t o n >
< / e l - p o p o v e r >
< span style = "float:right;" >
@ -181,7 +191,8 @@
< / e l - r e s u l t >
< / e l - r o w >
< / e l - r o w >
< el -table ref = "table" :height ="maxTableHeight" v -cloak v-show ="!showType" fit stripe :data="ScreenData" @sort-change="sortChange" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick" style="width: 100%;" >
< el -row class = "padding-top" >
< el -table ref = "table" :height ="maxTableHeight" v -cloak v-show ="!showType" fit stripe :data="ScreenData" @sort-change="sortChange" highlight-current-row v-loading="load.list" @selection-change="selsChange" @row-click="rowClick" style="width: 100%;" :border ="true" >
< el -row slot = "empty" >
< el -result icon = "info" title = "信息提示" subTitle = "没有查到相关项目,有可能是您暂时还没有项目,有可能是您无权限查询项目。" >
< template slot = "extra" >
@ -199,8 +210,6 @@
< / template >
< / e l - r e s u l t >
< / e l - r o w >
< el -table -column type = "index" label = "序号" width = "60" fixed = "left" > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "id" label = "项目编码" min -width = " 150 " sortable show -overflow -tooltip fixed = "left" > < / e l - t a b l e - c o l u m n >
< el -table -column prop = "name" label = "标题" sortable min -width = " 250 " fixed = "left" >
< template slot -scope = " scope " >
< el -link type = "primary" @click.stop ="intoInfo(scope.row)" > { { scope . row . name } } < / e l - l i n k >
@ -208,16 +217,29 @@
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "status" label = "状态" width = "100" sortable fixed = "left" >
< template slot -scope = " scope " >
< el -tag v-for ="(item,index) in formatDictsWithClass(dicts,'projectStatus',scope.row.status)" :key="index" :type="item.className" > {{ item.name }} < / el -tag >
< mdp -select -dict -tag :dict ="dicts['projectStatus']" :disabled ="true" v-model ="scope.row.status" > < / mdp -select -dict -tag >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "bizFlowState" label = "审批状态" min -width = " 120 " >
< template slot -scope = " scope " >
< mdp -select -dict -tag :dict ="dicts['bizFlowState']" :disabled ="true" v-model ="scope.row.bizFlowState" > < / mdp -select -dict -tag >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "finishRate" label = "进度" width = "100" sortable >
< el -table -column prop = "finishRate" label = "进度" width = "2 00" sortable >
< template slot -scope = " scope " >
< font > < el -tag :type ="scope.row.finishRate>=100?'success':'warning'" > { { scope . row . finishRate } } % < / e l - t a g >
< el -button id = "guider-four" type = "text" icon = "el-icon-video-play" title = "统计项目的工作量、进度、需求、bugs等数据" @ click.stop = " loadTasksToXmProjectState ( scope.row ) " > < / e l - b u t t o n >
< div style = "display:flex;" >
< div style = "width:40px;" >
{ { getProgress ( scope . row ) } } %
< / div >
< el -button id = "guider-four" type = "text" circle plain icon = "el-icon-video-play" title = "统计项目的工作量、进度、需求、bugs等数据" @ click.stop = " loadTasksToXmProjectState ( scope.row ) " > < / e l - b u t t o n >
< el -tag v-if ="getPlanRealProgress(scope.row)>0" type="warning" effect="dark" > 超前 {{ getPlanRealProgress ( scope.row ) }} % < / el -tag >
< el -tag v -else -if = " getPlanRealProgress ( scope.row ) < 0 " type = "danger" effect = "dark" > 落后 { { 0 - getPlanRealProgress ( scope . row ) } } % < / e l - t a g >
< el -tag v -else -if = " getProgress ( scope.row ) > 0 " effect=" dark " type=" success " class=" el - icon - check " > < / e l - t a g >
< el -tag v -else -if = " getProgress ( scope.row ) = = 0 " effect = "dark" type = "info" > 未开始 < / e l - t a g >
< / div >
< / font >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "productCnt" label = "项目数" sortable min -width = " 120 " >
@ -239,17 +261,12 @@
< span title = "关闭的缺陷数 / 缺陷总数 " > { { scope . row . bugCnt > 0 ? scope . row . closedBugs + ' / ' + scope . row . bugCnt : '' } } < / span >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "startTime" label = "起止时间" sortable min -width = " 150 " >
< el -table -column prop = "startTime" label = "起止时间" sortable min -width = " 150 " show -overflow -tooltip >
< template slot -scope = " scope " >
{ { scope . row . startTime ? scope . row . startTime . substr ( 0 , 10 ) : "" } } ~ { { scope . row . endTime ? scope . row . endTime . substr ( 0 , 10 ) : "" } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "bizFlowState" label = "审批状态" min -width = " 120 " >
< template slot -scope = " scope " >
< el -tag v-for ="(item,index) in formatDictsWithClass(dicts,'bizFlowState',scope.row.bizFlowState)" :key="index" :type="item.className" > {{ item.name }} < / el -tag >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "操作" width = "200" fixed = "right" >
< el -table -column label = "操作" width = "150" fixed = "right" >
< template slot -scope = " scope " >
<!-- < el -popover
placement = "left"
@ -257,7 +274,6 @@
< el -button v -if = " menukey = = ' myFocus ' " type = "text" @click.stop ="focusOrUnfocus(scope.row)" > 取消关注 < / e l - b u t t o n >
< el -button v -else type = "text" @click.stop ="focusOrUnfocus(scope.row)" > 关注 < / e l - b u t t o n >
< el -button type = "text" @click.stop ="intoInfo(scope.row)" > 视图 < / e l - b u t t o n >
< el -button type = "text" title = "通过复制快速创建新项目" @click.stop ="onCopyToBtnClick(scope.row)" v-loading ="load.add" > 复制 < / el -button >
< el -button type = "text" title = "删除项目" @click.stop ="handleDel(scope.row)" v-loading ="load.del" > 删除 < / el -button >
@ -291,6 +307,7 @@
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< / e l - r o w >
< / e l - r o w >
< el -pagination layout = "total, sizes, prev, pager, next" @current-change ="handleCurrentChange" @size-change ="handleSizeChange" : page -sizes = " [ 12 , 20 , 50 , 100 , 500 ] " :current-page ="pageInfo.pageNum" :page-size ="pageInfo.pageSize" :total ="pageInfo.total" style = "float:right;" > < / e l - p a g i n a t i o n >
< el -dialog title = "项目新增" :visible.sync ="addFormVisible" :with-header ="false" width = "80%" top = "20px" :close-on-click-modal ="false" append -to -body >
@ -398,16 +415,14 @@
}
} ,
data ( ) {
const beginDate = new Date ( ) ;
const endDate = new Date ( ) ;
beginDate . setTime ( beginDate . getTime ( ) - 3600 * 1000 * 24 * 7 * 4 * 12 ) ;
return {
filters : {
key : '' ,
productId : '' ,
productName : '' ,
id : '' , / / 项 目 编 号
createTimeStart : '' ,
createTimeEnd : '' ,
} ,
xmProjects : [ ] , / / 查 询 结 果
pageInfo : { / / 分 页 数 据
@ -435,15 +450,13 @@
} ,
/**begin 自定义属性请在下面加 请加备注**/
menukey : "all" ,
showType : tru e,
showType : fals e,
showInfo : false ,
selectProject : null ,
finishFlag : false ,
xmRecordVisible : false ,
productSelectVisible : false ,
maxTableHeight : 300 ,
dateRanger : [ ] ,
pickerOptions : util . getPickerOptions ( 'datarange' ) ,
xmProjectCopy : {
id : '' , name : '' , code : '' , isTpl : '' , copyPhase : '1' , copyTask : '1' , copyGroup : '1' , copyGroupUser : '0' , copyProduct : '1' , tplType : '2' ,
} ,
@ -493,10 +506,6 @@
} else {
/ / p a r a m s . x x x = x x x x x
}
if ( this . dateRanger && this . dateRanger . length == 2 ) {
}
this . load . list = true ;
if ( this . pageInfo . orderFields != null && this . pageInfo . orderFields . length > 0 ) {
let orderBys = [ ] ;
@ -516,8 +525,8 @@
if ( this . filters . status ) {
params . status = this . filters . status
}
params . createTimeStart = this . dateRanger [ 0 ]
params . createTimeEnd = this . dateRanger [ 1 ]
params . createTimeStart = this . filters . createTimeStart
params . createTimeEnd = this . filters . createTimeEnd
listXmProject ( params ) . then ( ( res ) => {
var tips = res . data . tips ;
if ( tips . isOk ) {
@ -822,13 +831,11 @@
onProductSelected : function ( product ) {
this . filters . productId = product . id
this . filters . productName = product . productName
this . getXmProjects ( )
this . productSelectVisible = false ;
} ,
onProductClose : function ( ) {
this . filters . productId = ''
this . filters . productName = ''
this . getXmProjects ( )
} ,
onCopyToBtnClick ( row ) {