|
@@ -258,14 +258,29 @@
|
|
|
<div class="titIcon" />
|
|
|
<div class="titSonName">任务列表</div>
|
|
|
</div>
|
|
|
+ <el-row v-if="!showHeader" class="select-main" type="flex" align="center">
|
|
|
+ <el-col :span="2">
|
|
|
+ <el-checkbox v-model="planChecked" class="plan-checked" @change="changeCheck" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="2" class="item-checked">已选择<span style="color: #409EFF">{{ curcentChecked }}</span>个</el-col>
|
|
|
+ <el-col :span="1" class="item-click">|</el-col>
|
|
|
+ <el-col :span="2" class="item-click" @click.native="handlePlan('test')">提测</el-col>
|
|
|
+ <el-col :span="2" class="item-click" @click.native="handlePlan('allow')">准出</el-col>
|
|
|
+ <el-col :span="4" class="item-click">建立测试日报</el-col>
|
|
|
+ <el-col :span="4" class="item-click" @click.native="handlePlan('cancel')">取消选择</el-col>
|
|
|
+ </el-row>
|
|
|
<el-table
|
|
|
+ ref="planTable"
|
|
|
:data="all_task"
|
|
|
style="width: 100%;"
|
|
|
size="mini"
|
|
|
:header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '550', textAlign: 'center' }"
|
|
|
show-overflow-tooltip="true"
|
|
|
+ :show-header="showHeader"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
>
|
|
|
- <el-table-column label="任务名称" min-width="100" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="任务名称" min-width="90" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope"><div style="cursor: pointer;" @click="link_task(scope.row.id)">{{ scope.row.name }}</div></template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="所属需求" min-width="100" align="center" show-overflow-tooltip>
|
|
@@ -274,7 +289,7 @@
|
|
|
<el-table-column label="状态" min-width="100" align="center">
|
|
|
<template slot-scope="scope">{{ scope.row.statusString }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="任务健康状态" min-width="100" align="center">
|
|
|
+ <el-table-column label="任务健康状态" min-width="120" align="center">
|
|
|
<template slot-scope="scope">{{ scope.row.stageString }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="开发负责人" min-width="100" align="center" show-overflow-tooltip>
|
|
@@ -716,7 +731,12 @@ export default {
|
|
|
condition: '',
|
|
|
noRequire: '',
|
|
|
formBackgroungInfo: [],
|
|
|
- requirement: null
|
|
|
+ requirement: null,
|
|
|
+ showHeader: true, // 任务列表的表头是否显示
|
|
|
+ curcentList: [], // 当前已选择的列表
|
|
|
+ curcentChecked: 0, // 当前已选择的数量
|
|
|
+ planChecked: false,
|
|
|
+ planHandleType: '' // 任务列表操作类型
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -1126,7 +1146,86 @@ export default {
|
|
|
handleCurrentChange(curIndex) { // 分页
|
|
|
this.curIndex = curIndex
|
|
|
this.click_name1(this.condition)
|
|
|
+ },
|
|
|
+ handleSelectionChange(val) { // 任务列表删选操作
|
|
|
+ val.length > 0 ? this.showHeader = false : this.showHeader = true
|
|
|
+ this.curcentChecked = val.length
|
|
|
+ this.curcentList = val
|
|
|
+ },
|
|
|
+ changeCheck(val) {
|
|
|
+ if (val) {
|
|
|
+ this.all_task.forEach(row => {
|
|
|
+ this.$refs.planTable.toggleRowSelection(row, true)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$refs.planTable.clearSelection()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handlePlan(type) { // 任务列表操作
|
|
|
+ this.planHandleType = type
|
|
|
+ switch (type) {
|
|
|
+ case 'test':
|
|
|
+ this.filtrateTest()
|
|
|
+ break
|
|
|
+ case 'allow':
|
|
|
+ this.filtrateAllow()
|
|
|
+ break
|
|
|
+ case 'cancel':
|
|
|
+ this.$refs.planTable.clearSelection()
|
|
|
+ break
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filtrateTest() { // 提测筛选
|
|
|
+ const isDevelop = this.curcentList.every(item => {
|
|
|
+ return item.statusString === '开发中'
|
|
|
+ })
|
|
|
+ if (!isDevelop) {
|
|
|
+ this.$message({
|
|
|
+ message: '存在状态不是【开发中】的任务,请将任务状态为【开发中】才可提测,请检查!',
|
|
|
+ type: 'error',
|
|
|
+ duration: 3000,
|
|
|
+ offset: 150
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filtrateAllow() { // 准出筛选
|
|
|
+ const isDevelop = this.curcentList.every(item => {
|
|
|
+ return item.statusString === '测试中'
|
|
|
+ })
|
|
|
+ if (!isDevelop) {
|
|
|
+ this.$message({
|
|
|
+ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可提测,请检查!',
|
|
|
+ type: 'error',
|
|
|
+ duration: 3000,
|
|
|
+ offset: 150
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+.plan-checked {
|
|
|
+ padding-left: 21px;
|
|
|
+}
|
|
|
+.select-main {
|
|
|
+ border-bottom: 1px solid #DCDFE6;
|
|
|
+ .item-checked {
|
|
|
+ color: #606266;
|
|
|
+ font-size: 14px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: left;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .item-click{
|
|
|
+ color: #606266;
|
|
|
+ font-size: 14px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|