Browse Source

界面优化

master
陈裕财 5 years ago
parent
commit
4124971371
  1. 4
      src/views/xm/core/xmMenu/XmMenuMng.vue
  2. 2
      src/views/xm/core/xmMenu/XmMenuWithPlan.vue
  3. 4
      src/views/xm/core/xmQuestion/XmQuestionAdd.vue
  4. 2
      src/views/xm/core/xmQuestion/XmQuestionEdit.vue
  5. 158
      src/views/xm/core/xmQuestion/XmQuestionMng.vue
  6. 56
      src/views/xm/core/xmTask/XmTaskList.vue
  7. 80
      src/views/xm/core/xmTask/XmTaskListForMenu.vue
  8. 73
      src/views/xm/core/xmTask/XmTaskListForProduct.vue
  9. 98
      src/views/xm/core/xmTask/XmTaskMng.vue
  10. 4
      src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue

4
src/views/xm/core/xmMenu/XmMenuMng.vue

@ -26,7 +26,7 @@
<el-button v-if=" batchEditVisible==true && isPmUser " type="danger" v-loading="load.del" @click="batchDel" :disabled="this.sels.length===0 || load.del==true">批量删除</el-button> <el-button v-if=" batchEditVisible==true && isPmUser " type="danger" v-loading="load.del" @click="batchDel" :disabled="this.sels.length===0 || load.del==true">批量删除</el-button>
</el-row> </el-row>
<el-row v-show="batchEditVisible" class="app-container"> <el-row v-show="batchEditVisible" class="app-container">
<el-table max-height="750" :data="xmMenusTreeData" class="drag-table" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table max-height="650" :data="xmMenusTreeData" class="drag-table" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="selection" width="45"></el-table-column> <el-table-column sortable type="selection" width="45"></el-table-column>
<el-table-column sortable prop="seqNo" label="序号" min-width="100"> <el-table-column sortable prop="seqNo" label="序号" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -71,7 +71,7 @@
</el-row> </el-row>
<el-row v-show="!batchEditVisible" class="app-container"> <el-row v-show="!batchEditVisible" class="app-container">
<el-table max-height="750" :data="xmMenusTreeData" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table max-height="700" :data="xmMenusTreeData" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="selection" width="40"></el-table-column> <el-table-column sortable type="selection" width="40"></el-table-column>
<el-table-column prop="menuName" label="故事名称" min-width="140" > <el-table-column prop="menuName" label="故事名称" min-width="140" >
<template slot-scope="scope"> <template slot-scope="scope">

2
src/views/xm/core/xmMenu/XmMenuWithPlan.vue

@ -13,7 +13,7 @@
<el-button v-if=" batchEditVisible==true " @click="noBatchEdit" v-loading="load.edit" icon="el-icon-back">返回</el-button> <el-button v-if=" batchEditVisible==true " @click="noBatchEdit" v-loading="load.edit" icon="el-icon-back">返回</el-button>
</el-row> </el-row>
<el-row class="app-container" v-show="!batchEditVisible"> <el-row class="app-container" v-show="!batchEditVisible">
<el-table max-height="750" v-if="!gstcVisible" :data="xmMenusTreeData" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table max-height="650" v-if="!gstcVisible" :data="xmMenusTreeData" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="selection" width="40"></el-table-column> <el-table-column sortable type="selection" width="40"></el-table-column>
<el-table-column prop="menuName" label="故事名称" min-width="150" > <el-table-column prop="menuName" label="故事名称" min-width="150" >
<template slot-scope="scope"> <template slot-scope="scope">

4
src/views/xm/core/xmQuestion/XmQuestionAdd.vue

@ -73,11 +73,11 @@
<xm-group-mng :sel-project="filters.selProject" :is-select-single-user="1" @user-confirm="onUserConfirm"></xm-group-mng> <xm-group-mng :sel-project="filters.selProject" :is-select-single-user="1" @user-confirm="onUserConfirm"></xm-group-mng>
</el-dialog> </el-dialog>
<el-dialog title="选中任务" :visible.sync="selectTaskVisible" width="80%" append-to-body :close-on-click-modal="false">
<el-dialog title="选中任务" :visible.sync="selectTaskVisible" fullscreen width="80%" append-to-body :close-on-click-modal="false">
<xm-task-list :sel-project="filters.selProject" @task-selected="onSelectedTask"></xm-task-list> <xm-task-list :sel-project="filters.selProject" @task-selected="onSelectedTask"></xm-task-list>
</el-dialog> </el-dialog>
<el-dialog append-to-body title="故事选择" :visible.sync="selectMenuVisible" width="80%" :close-on-click-modal="false">
<el-dialog append-to-body title="故事选择" :visible.sync="selectMenuVisible" width="80%" fullscreen :close-on-click-modal="false">
<xm-menu-select :is-select-menu="true" @selected="onSelectedMenu" :sel-project="filters.selProject"></xm-menu-select> <xm-menu-select :is-select-menu="true" @selected="onSelectedMenu" :sel-project="filters.selProject"></xm-menu-select>
</el-dialog> </el-dialog>

2
src/views/xm/core/xmQuestion/XmQuestionEdit.vue

@ -100,7 +100,7 @@
<el-dialog title="选中用户" :visible.sync="selectUserVisible" width="80%" append-to-body :close-on-click-modal="false"> <el-dialog title="选中用户" :visible.sync="selectUserVisible" width="80%" append-to-body :close-on-click-modal="false">
<xm-group-mng :sel-project="selProject" :is-select-single-user="1" @user-confirm="onUserConfirm"></xm-group-mng> <xm-group-mng :sel-project="selProject" :is-select-single-user="1" @user-confirm="onUserConfirm"></xm-group-mng>
</el-dialog> </el-dialog>
<el-dialog title="选中任务" :visible.sync="selectTaskVisible" width="80%" append-to-body :close-on-click-modal="false">
<el-dialog title="选中任务" :visible.sync="selectTaskVisible" width="80%" fullscreen append-to-body :close-on-click-modal="false">
<xm-task-list :sel-project="selProject" @task-selected="onSelectedTask"></xm-task-list> <xm-task-list :sel-project="selProject" @task-selected="onSelectedTask"></xm-task-list>
</el-dialog> </el-dialog>
</el-row> </el-row>

158
src/views/xm/core/xmQuestion/XmQuestionMng.vue

@ -1,25 +1,23 @@
<template> <template>
<section> <section>
<el-row class="xm-question"> <el-row class="xm-question">
<el-menu active-text-color="#00abfc" :default-active="filters.bugStatus" @select="changeBugStatus" class="el-menu-demo" mode="horizontal">
<el-menu-item class="showall" index="">全部状态</el-menu-item>
<el-menu-item v-for="(b,index) in options['bugStatus']" :index="b.optionValue" :key="index">{{b.optionName}}</el-menu-item>
<div style="line-height:50px;float:right;margin-right:10px;">
<el-button @click="showAdd" type="primary" icon="el-icon-plus">{{qtype=='risk'?'新建风险':'新建问题'}}</el-button>
</div>
</el-menu>
<el-menu active-text-color="#00abfc" :default-active="filters.solution" @select="changeSolution" class="el-menu-demo" mode="horizontal">
<el-menu-item class="showall" index="">全部方案</el-menu-item>
<el-menu-item v-for="(b,index) in options['bugSolution']" :index="b.optionValue" :key="index">{{b.optionName}}</el-menu-item>
</el-menu>
<el-menu active-text-color="#00abfc" :default-active="filters.bugSeverity" @select="changeBugSeverity" class="el-menu-demo" mode="horizontal">
<el-menu-item class="showall" index="">严重程度</el-menu-item>
<el-menu-item v-for="(b,index) in options['bugSeverity']" :index="b.optionValue" :key="index">{{b.optionName}}</el-menu-item>
</el-menu>
<el-menu active-text-color="#00abfc" :default-active="filters.priority" @select="changePriority" class="el-menu-demo" mode="horizontal">
<el-menu-item class="showall" index="">紧急程度</el-menu-item>
<el-menu-item v-for="(b,index) in options['urgencyLevel']" :index="b.optionValue" :key="index">{{b.optionName}}</el-menu-item>
<div style="line-height:50px;float:right;margin-right:10px;">
<el-row class="app-container">
<el-select v-model="filters.bugStatus" placeholder="请选择状态" clearable @change="changeBugStatus">
<el-option v-for="(b,index) in options['bugStatus']" :value="b.optionValue" :key="index" :label="b.optionName">{{b.optionName}}
</el-option>
</el-select>
<el-select v-model="filters.priority" placeholder="请选择紧急程度" clearable @change="changePriority">
<el-option v-for="(b,index) in options['urgencyLevel']" :value="b.optionValue" :key="index" :label="b.optionName">{{b.optionName}}
</el-option>
</el-select>
<el-select v-model="filters.solution" placeholder="请选择解决方案" clearable @change="changeSolution">
<el-option v-for="(b,index) in options['bugSolution']" :value="b.optionValue" :key="index" :label="b.optionName">{{b.optionName}}
</el-option>
</el-select>
<el-select v-model="filters.bugSeverity" placeholder="请选择严重程度" clearable @change="changeBugSeverity">
<el-option v-for="(b,index) in options['bugSeverity']" :value="b.optionValue" :key="index" :label="b.optionName">{{b.optionName}}
</el-option>
</el-select>
<el-tag v-if="filters.selProject && !selProject" closable @close="clearProject" @click="showProjectList(true)">{{ filters.selProject.name }}</el-tag> <el-tag v-if="filters.selProject && !selProject" closable @close="clearProject" @click="showProjectList(true)">{{ filters.selProject.name }}</el-tag>
<el-tag v-if="!filters.selProject" @click="showProjectList(true)" type="success">未选项目点我</el-tag> <el-tag v-if="!filters.selProject" @click="showProjectList(true)" type="success">未选项目点我</el-tag>
指派给:<el-tag v-if="!filters.handlerUsername" @click="showGroupUsers('handlerUsername')">未选,点我</el-tag><el-tag v-if="filters.handlerUsername" closable @close="clearHandler" @click="showGroupUsers('handlerUsername')">{{filters.handlerUsername}}</el-tag> 指派给:<el-tag v-if="!filters.handlerUsername" @click="showGroupUsers('handlerUsername')">未选,点我</el-tag><el-tag v-if="filters.handlerUsername" closable @close="clearHandler" @click="showGroupUsers('handlerUsername')">{{filters.handlerUsername}}</el-tag>
@ -30,67 +28,67 @@
</template> </template>
</el-input> </el-input>
<el-button @click="handleExport" type="primary" icon="el-icon-download">导出</el-button>
</div>
</el-menu>
<!--列表 XmQuestion xm_question-->
<el-table max-height="750" :data="xmQuestions" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="index" width="45"></el-table-column>
<el-table-column prop="name" label="问题名称" min-width="200">
<template slot-scope="scope">
<el-link type="primary" @click="showEdit(scope.row)">{{scope.row.id}}</el-link> &nbsp;{{scope.row.name}}
</template>
</el-table-column>
<el-table-column prop="bugStatus" label="状态" width="100" :formatter="formatterOption">
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.bugStatus=='create' ">创建</el-tag>
<el-tag type="primary" v-else-if="scope.row.bugStatus=='active'">激活</el-tag>
<el-tag type="warning" v-else-if="scope.row.bugStatus=='confirm'">确认</el-tag>
<el-tag type="warning" v-else-if="scope.row.bugStatus=='confirmed'">已确认</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='solve'">解决</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='resolved'">已解决</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='close'">关闭</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='closed'">已关闭</el-tag>
<el-tag v-else>{{scope.row.bugStatus}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="bugSeverity" label="严重程度" width="100" :formatter="formatterOption"></el-table-column>
<el-table-column prop="priority" label="紧急程度" width="100" :formatter="formatterOption"></el-table-column>
<el-table-column prop="solution" label="解决方案" width="100" :formatter="formatterOption"></el-table-column>
<el-table-column prop="handlerUsername" width="200" label="指派给" >
<template slot="header">
指派给<el-button @click="showGroupUsers('handlerUsername')" icon="el-icon-search" circle size="mini"></el-button>
</template>
</el-table-column>
<el-table-column prop="endTime" label="到期时间" width="120" :formatter="formatterDate"></el-table-column>
<el-table-column prop="bizFlowState" label="升级处理" width="120" >
<template slot-scope="scope">
<el-tooltip v-if="scope.row.flowState!='' && scope.row.flowState!=null" :content="showApprovaInfo(scope.row)" placement="bottom" effect="light">
<el-tag v-if="scope.row.flowState=='0' || scope.row.flowState==null ">未发审</el-tag>
<el-tag v-else-if="scope.row.flowState=='1'">审核中</el-tag>
<el-tag v-else-if="scope.row.flowState=='2'">已通过</el-tag>
<el-tag v-else-if="scope.row.flowState=='3'">未通过</el-tag>
<el-tag v-else-if="scope.row.flowState=='4'">已取消</el-tag>
</el-tooltip>
<el-button icon="el-icon-star-on" v-if="!scope.row.flowState" @click="handleCommand({type:'sendToProcessApprova',data:scope.row,bizKey:'xm_question_up_approva'})">{{qtype=='risk'?'升级':'升级'}}</el-button>
</template>
</el-table-column>
<el-table-column style="text-align:center;" class="el-icon-s-operation" align="center" width="100" fixed="right" >
<!-- <template slot="header" slot-scope="scope"><div class="el-icon-s-operation"></div></template> -->
<template slot-scope="scope">
<!-- <el-popover style="min-width:0 !important;" popper-class="autowidth" placement="left" trigger="hover"> -->
<el-button-group>
<el-button size="small" type="primary" @click.stop="showEdit(scope.row)">{{showSolveName(scope.row)}}</el-button>
</el-button-group>
<!-- <el-button slot="reference" class="see-more" type="text" icon="el-icon-more"></el-button>
</el-popover> -->
</template>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
<el-button @click="handleExport" type="primary" icon="el-icon-download">导出</el-button>
</el-row>
<el-row class="app-container">
<!--列表 XmQuestion xm_question-->
<el-table max-height="650" :data="xmQuestions" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column sortable type="index" width="45"></el-table-column>
<el-table-column prop="name" label="问题名称" min-width="200">
<template slot-scope="scope">
<el-link type="primary" @click="showEdit(scope.row)">{{scope.row.id}}</el-link> &nbsp;{{scope.row.name}}
</template>
</el-table-column>
<el-table-column prop="bugStatus" label="状态" width="100" :formatter="formatterOption">
<template slot-scope="scope">
<el-tag type="info" v-if="scope.row.bugStatus=='create' ">创建</el-tag>
<el-tag type="primary" v-else-if="scope.row.bugStatus=='active'">激活</el-tag>
<el-tag type="warning" v-else-if="scope.row.bugStatus=='confirm'">确认</el-tag>
<el-tag type="warning" v-else-if="scope.row.bugStatus=='confirmed'">已确认</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='solve'">解决</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='resolved'">已解决</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='close'">关闭</el-tag>
<el-tag type="success" v-else-if="scope.row.bugStatus=='closed'">已关闭</el-tag>
<el-tag v-else>{{scope.row.bugStatus}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="bugSeverity" label="严重程度" width="100" :formatter="formatterOption"></el-table-column>
<el-table-column prop="priority" label="紧急程度" width="100" :formatter="formatterOption"></el-table-column>
<el-table-column prop="solution" label="解决方案" width="100" :formatter="formatterOption"></el-table-column>
<el-table-column prop="handlerUsername" width="200" label="指派给" >
<template slot="header">
指派给<el-button @click="showGroupUsers('handlerUsername')" icon="el-icon-search" circle size="mini"></el-button>
</template>
</el-table-column>
<el-table-column prop="endTime" label="到期时间" width="120" :formatter="formatterDate"></el-table-column>
<el-table-column prop="bizFlowState" label="升级处理" width="120" >
<template slot-scope="scope">
<el-tooltip v-if="scope.row.flowState!='' && scope.row.flowState!=null" :content="showApprovaInfo(scope.row)" placement="bottom" effect="light">
<el-tag v-if="scope.row.flowState=='0' || scope.row.flowState==null ">未发审</el-tag>
<el-tag v-else-if="scope.row.flowState=='1'">审核中</el-tag>
<el-tag v-else-if="scope.row.flowState=='2'">已通过</el-tag>
<el-tag v-else-if="scope.row.flowState=='3'">未通过</el-tag>
<el-tag v-else-if="scope.row.flowState=='4'">已取消</el-tag>
</el-tooltip>
<el-button icon="el-icon-star-on" v-if="!scope.row.flowState" @click="handleCommand({type:'sendToProcessApprova',data:scope.row,bizKey:'xm_question_up_approva'})">{{qtype=='risk'?'升级':'升级'}}</el-button>
</template>
</el-table-column>
<el-table-column style="text-align:center;" class="el-icon-s-operation" align="center" width="100" fixed="right" >
<!-- <template slot="header" slot-scope="scope"><div class="el-icon-s-operation"></div></template> -->
<template slot-scope="scope">
<!-- <el-popover style="min-width:0 !important;" popper-class="autowidth" placement="left" trigger="hover"> -->
<el-button-group>
<el-button size="small" type="primary" @click.stop="showEdit(scope.row)">{{showSolveName(scope.row)}}</el-button>
</el-button-group>
<!-- <el-button slot="reference" class="see-more" type="text" icon="el-icon-more"></el-button>
</el-popover> -->
</template>
</el-table-column>
</el-table>
<el-pagination layout="total, sizes, prev, pager, next" @current-change="handleCurrentChange" @size-change="handleSizeChange" :page-sizes="[10,20, 50, 100, 500]" :current-page="pageInfo.pageNum" :page-size="pageInfo.pageSize" :total="pageInfo.total" style="float:right;"></el-pagination>
</el-row>
<!--编辑 XmQuestion xm_question界面--> <!--编辑 XmQuestion xm_question界面-->
<el-dialog title="编辑问题" :visible.sync="editFormVisible" fullscreen width="100%" append-to-body :close-on-click-modal="false"> <el-dialog title="编辑问题" :visible.sync="editFormVisible" fullscreen width="100%" append-to-body :close-on-click-modal="false">
<xm-question-edit :sel-project=" {id:editForm.projectId,name:editForm.projectName} " :xm-question="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit"></xm-question-edit> <xm-question-edit :sel-project=" {id:editForm.projectId,name:editForm.projectName} " :xm-question="editForm" :visible="editFormVisible" @cancel="editFormVisible=false" @submit="afterEditSubmit"></xm-question-edit>

56
src/views/xm/core/xmTask/XmTaskList.vue

@ -29,6 +29,7 @@
default-expand-all default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
row-key="id" row-key="id"
max-height="700"
> >
<el-table-column v-show="isMultiSelect" reserve-selection sortable width="50" type="selection"></el-table-column> <el-table-column v-show="isMultiSelect" reserve-selection sortable width="50" type="selection"></el-table-column>
<el-table-column prop="name" label="任务名称" min-width="260" > <el-table-column prop="name" label="任务名称" min-width="260" >
@ -44,9 +45,9 @@
<div> <div>
<div>{{getDateString(scope.row.startTime)}}~{{getDateString(scope.row.endTime)}}</div> <div>{{getDateString(scope.row.startTime)}}~{{getDateString(scope.row.endTime)}}</div>
</div> </div>
<div style="margin-left: 5px;color: #d92b2f !important;color:#bb6f2a;">
{{calcTaskStateByTime(scope.row.startTime,scope.row.endTime)}}
</div>
<div v-for="(item,index) in [calcTaskStateByTime(scope.row.startTime,scope.row.endTime,scope.row)]" :key="index ">
<el-tag :type="item.type">{{item.desc}}</el-tag>
</div>
</div> </div>
</template> </template>
@ -78,7 +79,7 @@
import { listOption } from '@/api/mdp/meta/itemOption';// import { listOption } from '@/api/mdp/meta/itemOption';//
import { getTask ,listXmTask,editXmTask,editRate, delXmTask, batchDelXmTask,batchImportTaskFromTemplate,batchSaveBudget } from '@/api/xm/core/xmTask'; import { getTask ,listXmTask,editXmTask,editRate, delXmTask, batchDelXmTask,batchImportTaskFromTemplate,batchSaveBudget } from '@/api/xm/core/xmTask';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import xmProjectPhaseMng from '../xmProjectPhase/XmProjectPhaseMng';
import xmProjectPhaseMng from '../xmProjectPhase/XmProjectPhaseSelect';
import XmProjectList from '../xmProject/XmProjectList'; import XmProjectList from '../xmProject/XmProjectList';
export default { export default {
@ -248,19 +249,50 @@
this.load.list = false; this.load.list = false;
}).catch( err => this.load.list = false ); }).catch( err => this.load.list = false );
}, },
calcTaskStateByTime(startTime,endTime){
calcTaskStateByTime(startTime,endTime,row){
var obj={
type:'',
desc:''
}
if(startTime==null || startTime=="" || endTime==null || endTime ==""){ if(startTime==null || startTime=="" || endTime==null || endTime ==""){
return "未配置日期"
obj={
type:'info',
desc:"未配置日期"
}
return obj;
} }
var curDate=new Date(); var curDate=new Date();
var start=new Date(startTime); var start=new Date(startTime);
var end=new Date(endTime); var end=new Date(endTime);
if(this.getDaysBetween(curDate, start)<=0){
return this.toFixed(this.getDaysBetween(start,curDate))+"天后开始";
}else if( this.getDaysBetween(curDate, start) > 0 && this.getDaysBetween(curDate, end) <= 0 ){
return this.toFixed(this.getDaysBetween(end, curDate))+"天后结束";
}else if( this.getDaysBetween(curDate, end) > 0 ){
return "逾期"+( this.toFixed(this.getDaysBetween(curDate, end)) )+"天";
var rate=row.rate;
var isOver=row.rate>=100;
var days=this.getDaysBetween(curDate, start);
if(days<=0){
obj={
type:'info',
desc:this.toFixed(this.getDaysBetween(start,curDate))+"天后开始"
}
return obj;
}else if( this.getDaysBetween(curDate, start) > 0 && this.getDaysBetween(curDate, end) <= 0 ){
obj={
type:'primary',
desc:this.toFixed(this.getDaysBetween(end, curDate))+"天后结束"
}
return obj;
}else if( this.getDaysBetween(curDate, end) > 0 ){
if(!isOver){
obj={
type:'danger',
desc:"逾期"+( this.toFixed(this.getDaysBetween(curDate, end)) )+"天"
}
}else{
obj={
type:'success',
desc:"完工"+( this.toFixed(this.getDaysBetween(curDate, end)) )+"天"
}
}
return obj;
} }
}, },
/** /**

80
src/views/xm/core/xmTask/XmTaskListForMenu.vue

@ -20,6 +20,7 @@
default-expand-all default-expand-all
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
row-key="id" row-key="id"
max-height="450"
> >
<el-table-column v-show="isMultiSelect" sortable width="50" type="selection"></el-table-column> <el-table-column v-show="isMultiSelect" sortable width="50" type="selection"></el-table-column>
<el-table-column prop="name" label="任务名称" min-width="260" > <el-table-column prop="name" label="任务名称" min-width="260" >
@ -36,11 +37,7 @@
<el-tag type= 'info' >{{parseFloat(scope.row.budgetCost/10000).toFixed(2)}},{{scope.row.budgetWorkload}}人时</el-tag> <el-tag type= 'info' >{{parseFloat(scope.row.budgetCost/10000).toFixed(2)}},{{scope.row.budgetWorkload}}人时</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="执行人" prop="exeUsernames" min-width="120" >
<template slot-scope="scope">
<el-link v-if="scope.row.exeUsernames!=null && scope.row.exeUsernames !='' " @click.stop="showExecusers(scope.row)">{{scope.row.exeUsernames}}</el-link>
<el-link type="warning" v-if="scope.row.exeUsernames==null || scope.row.exeUsernames ==''" @click.stop="showExecusers(scope.row)" >去抢任务</el-link>
</template>
<el-table-column label="执行人" prop="exeUsernames" min-width="120" >
</el-table-column> </el-table-column>
<el-table-column prop="rate" label="进度" width="100"> <el-table-column prop="rate" label="进度" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -51,17 +48,17 @@
</el-table-column> </el-table-column>
<el-table-column prop="startTime" label="任务起止时间" width="300"> <el-table-column prop="startTime" label="任务起止时间" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display:flex;align-items:center;">
<div>
<div>{{getDateString(scope.row.startTime)}}~{{getDateString(scope.row.endTime)}}</div>
</div>
<div style="margin-left: 5px;color: #d92b2f !important;color:#bb6f2a;">
{{calcTaskStateByTime(scope.row.startTime,scope.row.endTime)}}
<div style="display:flex;align-items:center;">
<div>
<div>{{getDateString(scope.row.startTime)}}~{{getDateString(scope.row.endTime)}}</div>
</div>
<div v-for="(item,index) in [calcTaskStateByTime(scope.row.startTime,scope.row.endTime,scope.row)]" :key="index ">
<el-tag :type="item.type">{{item.desc}}</el-tag>
</div>
</div> </div>
</div>
</template>
</template>
</el-table-column> </el-table-column>
<!-- <!--
<el-table-column label="外购" prop="taskOut" width="80"> <el-table-column label="外购" prop="taskOut" width="80">
@ -72,13 +69,9 @@
<el-table-column label="结算方案" prop="settleSchemel" width="120" :formatter="formatterOption"> <el-table-column label="结算方案" prop="settleSchemel" width="120" :formatter="formatterOption">
</el-table-column> </el-table-column>
--> -->
<el-table-column label="任务技能需求" prop="taskSkillNames" min-width="120" >
<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="success" >去补充</el-link>
</template>
<el-table-column label="任务技能需求" prop="taskSkillNames" min-width="120" >
</el-table-column> </el-table-column>
<el-table-column v-if="isMultiSelect==true" header-align="center" label="操作" fixed="right" width="200">
<el-table-column v-if="isMultiSelect==false" header-align="center" label="操作" fixed="right" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click.stop="selectedTask(scope.row)" >选择</el-button> <el-button size="mini" type="primary" @click.stop="selectedTask(scope.row)" >选择</el-button>
</template> </template>
@ -237,19 +230,50 @@
this.load.list = false; this.load.list = false;
}).catch( err => this.load.list = false ); }).catch( err => this.load.list = false );
}, },
calcTaskStateByTime(startTime,endTime){
calcTaskStateByTime(startTime,endTime,row){
var obj={
type:'',
desc:''
}
if(startTime==null || startTime=="" || endTime==null || endTime ==""){ if(startTime==null || startTime=="" || endTime==null || endTime ==""){
return "未配置日期"
obj={
type:'info',
desc:"未配置日期"
}
return obj;
} }
var curDate=new Date(); var curDate=new Date();
var start=new Date(startTime); var start=new Date(startTime);
var end=new Date(endTime); var end=new Date(endTime);
if(this.getDaysBetween(curDate, start)<=0){
return this.toFixed(this.getDaysBetween(start,curDate))+"天后开始";
}else if( this.getDaysBetween(curDate, start) > 0 && this.getDaysBetween(curDate, end) <= 0 ){
return this.toFixed(this.getDaysBetween(end, curDate))+"天后结束";
}else if( this.getDaysBetween(curDate, end) > 0 ){
return "逾期"+( this.toFixed(this.getDaysBetween(curDate, end)) )+"天";
var rate=row.rate;
var isOver=row.rate>=100;
var days=this.getDaysBetween(curDate, start);
if(days<=0){
obj={
type:'info',
desc:this.toFixed(this.getDaysBetween(start,curDate))+"天后开始"
}
return obj;
}else if( this.getDaysBetween(curDate, start) > 0 && this.getDaysBetween(curDate, end) <= 0 ){
obj={
type:'primary',
desc:this.toFixed(this.getDaysBetween(end, curDate))+"天后结束"
}
return obj;
}else if( this.getDaysBetween(curDate, end) > 0 ){
if(!isOver){
obj={
type:'danger',
desc:"逾期"+( this.toFixed(this.getDaysBetween(curDate, end)) )+"天"
}
}else{
obj={
type:'success',
desc:"完工"+( this.toFixed(this.getDaysBetween(curDate, end)) )+"天"
}
}
return obj;
} }
}, },
/** /**

73
src/views/xm/core/xmTask/XmTaskListForProduct.vue

@ -13,7 +13,7 @@
<xm-project-phase-mng :sel-project="filters.selProject" :simple="true" @row-click="projectPhaseRowClick"></xm-project-phase-mng> <xm-project-phase-mng :sel-project="filters.selProject" :simple="true" @row-click="projectPhaseRowClick"></xm-project-phase-mng>
</el-col> </el-col>
<el-col :span=" filters.selProject?20:24"> <el-col :span=" filters.selProject?20:24">
<el-table
<el-table max-height="650"
ref="taskTable" ref="taskTable"
show-summary show-summary
:data="tasksTreeData" :data="tasksTreeData"
@ -46,7 +46,7 @@
<el-table-column label="执行人" prop="exeUsernames" min-width="120" > <el-table-column label="执行人" prop="exeUsernames" min-width="120" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link v-if="scope.row.exeUsernames!=null && scope.row.exeUsernames !='' " @click.stop="showExecusers(scope.row)">{{scope.row.exeUsernames}}</el-link> <el-link v-if="scope.row.exeUsernames!=null && scope.row.exeUsernames !='' " @click.stop="showExecusers(scope.row)">{{scope.row.exeUsernames}}</el-link>
<el-link type="warning" v-if="scope.row.exeUsernames==null || scope.row.exeUsernames ==''" @click.stop="showExecusers(scope.row)" >去抢任务</el-link>
<el-link v-if="scope.row.exeUsernames==null || scope.row.exeUsernames ==''" >无人参与</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="rate" label="进度" width="100"> <el-table-column prop="rate" label="进度" width="100">
@ -57,18 +57,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="startTime" label="任务起止时间" width="300"> <el-table-column prop="startTime" label="任务起止时间" width="300">
<template slot-scope="scope">
<div style="display:flex;align-items:center;">
<div>
<div>{{getDateString(scope.row.startTime)}}~{{getDateString(scope.row.endTime)}}</div>
</div>
<div style="margin-left: 5px;color: #d92b2f !important;color:#bb6f2a;">
{{calcTaskStateByTime(scope.row.startTime,scope.row.endTime)}}
<template slot-scope="scope">
<div style="display:flex;align-items:center;">
<div>
<div>{{getDateString(scope.row.startTime)}}~{{getDateString(scope.row.endTime)}}</div>
</div>
<div v-for="(item,index) in [calcTaskStateByTime(scope.row.startTime,scope.row.endTime,scope.row)]" :key="index ">
<el-tag :type="item.type">{{item.desc}}</el-tag>
</div>
</div> </div>
</div>
</template>
</template>
</el-table-column> </el-table-column>
<!-- <!--
<el-table-column label="外购" prop="taskOut" width="80"> <el-table-column label="外购" prop="taskOut" width="80">
@ -105,7 +105,7 @@
import { listOption } from '@/api/mdp/meta/itemOption';// import { listOption } from '@/api/mdp/meta/itemOption';//
import { getTask ,listXmTask,editXmTask,editRate, delXmTask, batchDelXmTask,batchImportTaskFromTemplate,batchSaveBudget } from '@/api/xm/core/xmTask'; import { getTask ,listXmTask,editXmTask,editRate, delXmTask, batchDelXmTask,batchImportTaskFromTemplate,batchSaveBudget } from '@/api/xm/core/xmTask';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import xmProjectPhaseMng from '../xmProjectPhase/XmProjectPhaseMng';
import xmProjectPhaseMng from '../xmProjectPhase/XmProjectPhaseSelect';
import XmProjectList from '../xmProject/XmProjectList'; import XmProjectList from '../xmProject/XmProjectList';
export default { export default {
@ -267,19 +267,50 @@
this.load.list = false; this.load.list = false;
}).catch( err => this.load.list = false ); }).catch( err => this.load.list = false );
}, },
calcTaskStateByTime(startTime,endTime){
calcTaskStateByTime(startTime,endTime,row){
var obj={
type:'',
desc:''
}
if(startTime==null || startTime=="" || endTime==null || endTime ==""){ if(startTime==null || startTime=="" || endTime==null || endTime ==""){
return "未配置日期"
obj={
type:'info',
desc:"未配置日期"
}
return obj;
} }
var curDate=new Date(); var curDate=new Date();
var start=new Date(startTime); var start=new Date(startTime);
var end=new Date(endTime); var end=new Date(endTime);
if(this.getDaysBetween(curDate, start)<=0){
return this.toFixed(this.getDaysBetween(start,curDate))+"天后开始";
}else if( this.getDaysBetween(curDate, start) > 0 && this.getDaysBetween(curDate, end) <= 0 ){
return this.toFixed(this.getDaysBetween(end, curDate))+"天后结束";
}else if( this.getDaysBetween(curDate, end) > 0 ){
return "逾期"+( this.toFixed(this.getDaysBetween(curDate, end)) )+"天";
var rate=row.rate;
var isOver=row.rate>=100;
var days=this.getDaysBetween(curDate, start);
if(days<=0){
obj={
type:'info',
desc:this.toFixed(this.getDaysBetween(start,curDate))+"天后开始"
}
return obj;
}else if( this.getDaysBetween(curDate, start) > 0 && this.getDaysBetween(curDate, end) <= 0 ){
obj={
type:'primary',
desc:this.toFixed(this.getDaysBetween(end, curDate))+"天后结束"
}
return obj;
}else if( this.getDaysBetween(curDate, end) > 0 ){
if(!isOver){
obj={
type:'danger',
desc:"逾期"+( this.toFixed(this.getDaysBetween(curDate, end)) )+"天"
}
}else{
obj={
type:'success',
desc:"完工"+( this.toFixed(this.getDaysBetween(curDate, end)) )+"天"
}
}
return obj;
} }
}, },
/** /**

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

@ -6,57 +6,55 @@
</el-col> </el-col>
<el-col :span="isTaskCenter!='1' && currentProject?20:24" class="app-container"> <el-col :span="isTaskCenter!='1' && currentProject?20:24" class="app-container">
<el-row> <el-row>
<el-menu active-text-color="#00abfc" :default-active="selkey" @select="changeSelKey" class="el-menu-demo" mode="horizontal">
<el-menu-item class="showall" index="all">全部状态</el-menu-item>
<el-menu-item index="work">未完成</el-menu-item>
<el-menu-item index="finish">已完成</el-menu-item>
<el-menu-item index="myFocus">我关注</el-menu-item>
<el-menu-item index="myExecuserStatus0">我排队</el-menu-item>
<el-menu-item index="myExecuserStatus1">我执行</el-menu-item>
<el-menu-item index="myExecuserStatus2">我提交</el-menu-item>
<el-menu-item index="myExecuserStatus3">我的验收成功</el-menu-item>
<el-menu-item index="myExecuserStatus4">我的验收失败</el-menu-item>
<el-menu-item index="myExecuserStatus5">我的付款中</el-menu-item>
<el-menu-item index="myExecuserStatus6">我的付款成功</el-menu-item>
<el-menu-item index="myExecuserStatus7">我放弃的</el-menu-item>
</el-menu>
</el-row>
<el-row>
<el-menu active-text-color="#00abfc" :default-active="filters.taskType" @select="changeTaskType" class="el-menu-demo" mode="horizontal">
<el-menu-item index="all">全部类型</el-menu-item>
<el-menu-item v-for="(i,index) in options.taskType" :index="i.optionValue" :key="index">{{i.optionName}}</el-menu-item>
<div style="line-height:50px;float:right;margin-right:10px;">
<el-checkbox v-model="gstcVisible" >甘特图</el-checkbox>
<el-tag v-if=" !selProject && filters.selProject" :closable="!selProject" @click="showProjectList" @close="clearProject">项目:{{this.filters.selProject.name}}</el-tag>
<el-tag v-if=" !selProject && !filters.selProject" @click="showProjectList" type="plian">未选项目点我</el-tag>
<el-select v-model="filters.selKey" placeholder="请选择任务状态" clearable @change="changeSelKey">
<el-option class="showall" value="all" label="全部状态">全部状态</el-option>
<el-option value="work" label="未完成">未完成</el-option>
<el-option value="finish" label="已完成">已完成</el-option>
<el-option value="myFocus" label="我关注">我关注</el-option>
<el-option value="myExecuserStatus0" label="我排队">我排队</el-option>
<el-option value="myExecuserStatus1" label="我执行">我执行</el-option>
<el-option value="myExecuserStatus2" label="我提交">我提交</el-option>
<el-option value="myExecuserStatus3" label="我的验收成功">我的验收成功</el-option>
<el-option value="myExecuserStatus4" label="我的验收失败">我的验收失败</el-option>
<el-option value="myExecuserStatus5" label="我的付款中">我的付款中</el-option>
<el-option value="myExecuserStatus6" label="我的付款成功">我的付款成功</el-option>
<el-option value="myExecuserStatus7" label="我放弃的">我放弃的</el-option>
</el-select>
<el-select v-model="filters.taskType" placeholder="请选择任务类型" clearable @change="changeTaskType">
<el-option class="showall" value="all" label="全部类型">全部类型</el-option>
<el-option v-for="(i,index) in options.taskType" :value="i.optionValue" :label="i.optionName" :key="index">{{i.optionName}}</el-option>
</el-select>
<div style="line-height:50px;float:right;margin-right:10px;">
<el-checkbox v-model="gstcVisible" >甘特图</el-checkbox>
<el-tag v-if=" !selProject && filters.selProject" :closable="!selProject" @click="showProjectList" @close="clearProject">项目:{{this.filters.selProject.name}}</el-tag>
<el-tag v-if=" !selProject && !filters.selProject" @click="showProjectList" type="plian">未选项目点我</el-tag>
<el-input style="width:200px;" v-model="searchTask" placeholder="任务名称">
<template slot="append">
<el-button @click="searchXmTasks" type="primary" icon="el-icon-search"></el-button>
</template>
</el-input>
<el-button v-if=" isTaskCenter!='1' && isMy!='1'" @click="showAdd" type="primary" icon="el-icon-plus" round></el-button>
<el-popover
placement="top-start"
title=""
width="200"
trigger="hover" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<el-button type="primary" v-if=" isTaskCenter!='1' && isMy!='1'" @click="showBatchEdit" v-loading="load.edit" icon="el-icon-edit">批量修改任务</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button v-if=" isTaskCenter!='1' && isMy!='1'" @click="showTaskTemplate" type="success" icon="el-icon-plus">从模板快速导入任务</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button v-if=" isTaskCenter!='1' && isMy!='1'" @click="showMenu" type="success" icon="el-icon-plus">由故事快速创建任务</el-button>
</el-col>
</el-row>
<el-button slot="reference" icon="el-icon-more" circle></el-button>
</el-popover>
</div>
</el-menu>
</el-row>
<el-input style="width:200px;" v-model="searchTask" placeholder="任务名称">
<template slot="append">
<el-button @click="searchXmTasks" type="primary" icon="el-icon-search"></el-button>
</template>
</el-input>
<el-button v-if=" isTaskCenter!='1' && isMy!='1'" @click="showAdd" type="primary" icon="el-icon-plus" round></el-button>
<el-popover
placement="top-start"
title=""
width="200"
trigger="hover" >
<el-row>
<el-col :span="24" style="padding-top:5px;">
<el-button type="primary" v-if=" isTaskCenter!='1' && isMy!='1'" @click="showBatchEdit" v-loading="load.edit" icon="el-icon-edit">批量修改任务</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button v-if=" isTaskCenter!='1' && isMy!='1'" @click="showTaskTemplate" type="success" icon="el-icon-plus">从模板快速导入任务</el-button>
</el-col>
<el-col :span="24" style="padding-top:5px;">
<el-button v-if=" isTaskCenter!='1' && isMy!='1'" @click="showMenu" type="success" icon="el-icon-plus">由故事快速创建任务</el-button>
</el-col>
</el-row>
<el-button slot="reference" icon="el-icon-more" circle></el-button>
</el-popover>
</div>
</el-row>
<el-row> <el-row>
<el-table v-if="!gstcVisible" <el-table v-if="!gstcVisible"
show-summary show-summary

4
src/views/xm/core/xmTestCaseExec/XmTestCaseExecMng.vue

@ -135,13 +135,13 @@
<xm-task-list :sel-project="filters.selProject" @task-selected="onSelectedTask"></xm-task-list> <xm-task-list :sel-project="filters.selProject" @task-selected="onSelectedTask"></xm-task-list>
</el-dialog> </el-dialog>
<el-dialog title="查看用例" :visible.sync="caseVisible" width="80%" append-to-body :close-on-click-modal="false">
<el-dialog title="查看用例" :visible.sync="caseVisible" width="80%" fullscreen append-to-body :close-on-click-modal="false">
<xm-test-case-mng :case-id="editForm.caseId" :visible="caseVisible" ></xm-test-case-mng> <xm-test-case-mng :case-id="editForm.caseId" :visible="caseVisible" ></xm-test-case-mng>
</el-dialog> </el-dialog>
<el-dialog title="测试用例" :visible.sync="caseVisible" width="80%" append-to-body :close-on-click-modal="false"> <el-dialog title="测试用例" :visible.sync="caseVisible" width="80%" append-to-body :close-on-click-modal="false">
<xm-test-case-edit :xm-test-case="xmTestCase" :visible="caseVisible" @cancel="caseVisible=false" ></xm-test-case-edit> <xm-test-case-edit :xm-test-case="xmTestCase" :visible="caseVisible" @cancel="caseVisible=false" ></xm-test-case-edit>
</el-dialog> </el-dialog>
<el-dialog title="问题列表" :visible.sync="bugsVisible" width="80%" append-to-body :close-on-click-modal="false">
<el-dialog title="问题列表" :visible.sync="bugsVisible" width="80%" append-to-body fullscreen :close-on-click-modal="false">
<xm-question-mng :xm-test-case="xmTestCase" :xm-test-case-exec="editForm" :sel-project="filters.selProject" :visible="bugsVisible" @cancel="bugsVisible=false" ></xm-question-mng> <xm-question-mng :xm-test-case="xmTestCase" :xm-test-case-exec="editForm" :sel-project="filters.selProject" :visible="bugsVisible" @cancel="bugsVisible=false" ></xm-question-mng>
</el-dialog> </el-dialog>

Loading…
Cancel
Save