|
@@ -1,97 +1,115 @@
|
|
|
<template>
|
|
|
<div class="container">
|
|
|
<el-header class="requirement-header">
|
|
|
- <el-input id="basicName1" v-model="searchForm.name" placeholder="需求名称" style="width: 8%;" />
|
|
|
- <el-dropdown @command="handleCommand">
|
|
|
- <span class="el-dropdown-link">
|
|
|
- {{ searchTitle.project }}
|
|
|
- <i class="el-icon-arrow-down el-icon--right" />
|
|
|
- </span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item
|
|
|
- v-for="(item,index) in searchInfo.belongingProject"
|
|
|
- :key="index"
|
|
|
- :command="{value: item,flag: 1}"
|
|
|
- >{{ item.msg }}</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
- <el-dropdown @command="handleCommand">
|
|
|
- <span class="el-dropdown-link">
|
|
|
- {{ searchTitle.businessline }}
|
|
|
- <i class="el-icon-arrow-down el-icon--right" />
|
|
|
- </span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item
|
|
|
- v-for="(item,index) in searchInfo.bizType"
|
|
|
- :key="index"
|
|
|
- :command="{value: item,flag: 2}"
|
|
|
- >{{ item.msg }}</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
- <el-dropdown @command="handleCommand">
|
|
|
- <span class="el-dropdown-link">
|
|
|
- {{ searchTitle.source }}
|
|
|
- <i class="el-icon-arrow-down el-icon--right" />
|
|
|
- </span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item
|
|
|
- v-for="(item,index) in searchInfo.sourceType"
|
|
|
- :key="index"
|
|
|
- :command="{value: item,flag: 3}"
|
|
|
- >{{ item.msg }}</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
- <el-dropdown @command="handleCommand">
|
|
|
- <span class="el-dropdown-link">
|
|
|
- {{ searchTitle.priority }}
|
|
|
- <i class="el-icon-arrow-down el-icon--right" />
|
|
|
- </span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item
|
|
|
- v-for="(item,index) in searchInfo.priority"
|
|
|
- :key="index"
|
|
|
- :command="{value: item,flag: 4}"
|
|
|
- >{{ item.msg }}</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
- <el-select
|
|
|
- id="basicName2"
|
|
|
- v-model="searchForm.pm"
|
|
|
- filterable
|
|
|
- remote
|
|
|
- placeholder="PM"
|
|
|
- :remote-method="searchUser"
|
|
|
- :loading="userLoading"
|
|
|
- >
|
|
|
- <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="item.idap">
|
|
|
- <div style="text-align: center">
|
|
|
- <span style="float: left;color: #8492a6; font-size: 13px">{{ item.idap }}</span>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.deptName }}</span>
|
|
|
- </div>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <el-select
|
|
|
- id="basicName3"
|
|
|
- v-model="searchForm.creator"
|
|
|
- filterable
|
|
|
- remote
|
|
|
- placeholder="创建人"
|
|
|
- :remote-method="searchUser"
|
|
|
- :loading="userLoading"
|
|
|
- >
|
|
|
- <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="item.idap">
|
|
|
- <div style="text-align: center">
|
|
|
- <span style="float: left;color: #8492a6; font-size: 13px">{{ item.idap }}</span>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.deptName }}</span>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-input id="requirement_basicName1" v-model="searchForm.name" placeholder="需求名称" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-dropdown @command="handleCommand">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ {{ getTitle(searchTitle.project) }}
|
|
|
+ <i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown" class="requirement_el-dropdown-menu">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-for="(item,index) in searchInfo.belongingProject"
|
|
|
+ :key="index"
|
|
|
+ :command="{value: item,flag: 1}"
|
|
|
+ >{{ item.msg }}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-dropdown @command="handleCommand">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ {{ getTitle(searchTitle.businessline) }}
|
|
|
+ <i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown" class="requirement_el-dropdown-menu">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-for="(item,index) in searchInfo.bizType"
|
|
|
+ :key="index"
|
|
|
+ :command="{value: item,flag: 2}"
|
|
|
+ >{{ item.msg }}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-dropdown @command="handleCommand">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ {{ getTitle(searchTitle.source) }}
|
|
|
+ <i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown" class="requirement_el-dropdown-menu">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-for="(item,index) in searchInfo.sourceType"
|
|
|
+ :key="index"
|
|
|
+ :command="{value: item,flag: 3}"
|
|
|
+ >{{ item.msg }}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-dropdown @command="handleCommand">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ {{ getTitle(searchTitle.priority) }}
|
|
|
+ <i class="el-icon-arrow-down el-icon--right" />
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown" class="requirement_el-dropdown-menu">
|
|
|
+ <el-dropdown-item
|
|
|
+ v-for="(item,index) in searchInfo.priority"
|
|
|
+ :key="index"
|
|
|
+ :command="{value: item,flag: 4}"
|
|
|
+ >{{ item.msg }}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-select
|
|
|
+ id="requirement_basicName2"
|
|
|
+ v-model="searchForm.pm"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ placeholder="PM"
|
|
|
+ :remote-method="searchUser"
|
|
|
+ :loading="userLoading"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="item.idap">
|
|
|
+ <div style="text-align: center">
|
|
|
+ <span style="float: left;color: #8492a6; font-size: 13px">{{ item.idap }}</span>
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{ item.deptName }}</span>
|
|
|
+ </div>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-select
|
|
|
+ id="requirement_basicName3"
|
|
|
+ v-model="searchForm.creator"
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ placeholder="创建人"
|
|
|
+ :remote-method="searchUser"
|
|
|
+ :loading="userLoading"
|
|
|
+ >
|
|
|
+ <el-option v-for="item in options" :key="item.idap" :label="item.name" :value="item.idap">
|
|
|
+ <div style="text-align: center">
|
|
|
+ <span style="float: left;color: #8492a6; font-size: 13px">{{ item.idap }}</span>
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{ item.deptName }}</span>
|
|
|
+ </div>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <div style="float: right">
|
|
|
+ <el-button type="primary" size="mini" @click="getTableData">查询</el-button>
|
|
|
+ <el-button size="mini" @click="reset">重置</el-button>
|
|
|
</div>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <div>
|
|
|
- <el-button type="primary" size="mini" @click="getTableData">查询</el-button>
|
|
|
- <el-button size="mini" @click="reset">重置</el-button>
|
|
|
- </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-header>
|
|
|
<el-main class="requirement-main">
|
|
|
<div style="font-size: 18px;margin: 2%">
|
|
@@ -111,25 +129,32 @@
|
|
|
highlight-current-row
|
|
|
:header-cell-style="{ background: '#6AB4FF', color: '#FFFFFF',textAlign: 'center'}"
|
|
|
:cell-style="{textAlign: 'center'}"
|
|
|
- @current-change="handleCurrentRowChange"
|
|
|
>
|
|
|
<el-table-column prop="priority" label="优先级" sortable min-width="8%">
|
|
|
<template v-slot="scope">
|
|
|
<div class="div_priority" :style="{background: priorityColors[scope.row.priority % priorityColors.length]}">{{ 'P'+scope.row.priority }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="需求名称" min-width="15%" />
|
|
|
- <el-table-column prop="belongingProject" label="归属的项目" min-width="10%">
|
|
|
+ <el-table-column prop="name" label="需求名称" min-width="15%">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <div style="cursor: pointer;" @click="getToRequirementDetails(scope.row.id)">{{ scope.row.name }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="belongingProjectName" label="归属的项目" min-width="10%">
|
|
|
<template v-slot="scope">
|
|
|
{{ getProjectName(scope.row.belongingProject) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="bizId" label="业务线" min-width="10%">
|
|
|
<template v-slot="scope">
|
|
|
- {{ getBizName(scope.row.belongingProject) }}
|
|
|
+ {{ getBizName(scope.row.bizId) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="pm" label="产品" min-width="10%">
|
|
|
+ <template v-slot="scope">
|
|
|
+ {{ scope.row.pm[0]?scope.row.pm[0].name:'无' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="pm" label="产品" min-width="10%" />
|
|
|
<el-table-column prop="taskCount" label="任务总数" min-width="8%" />
|
|
|
<el-table-column prop="bugCount" label="bug总数" min-width="8%" />
|
|
|
<el-table-column prop="creator" label="创建人" min-width="10%" />
|
|
@@ -220,6 +245,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ getTitle(str) {
|
|
|
+ if (str.length <= 6) {
|
|
|
+ return str
|
|
|
+ } else {
|
|
|
+ return str.substring(0, 6) + '...'
|
|
|
+ }
|
|
|
+ },
|
|
|
getTableData() {
|
|
|
this.loading = true
|
|
|
getRequirement(this.searchForm).then(res => {
|
|
@@ -333,8 +365,8 @@ export default {
|
|
|
}
|
|
|
return ret
|
|
|
},
|
|
|
- handleCurrentRowChange(val) {
|
|
|
- this.$router.push({ name: '需求详情', params: { id: val.id + '' }})
|
|
|
+ getToRequirementDetails(id) {
|
|
|
+ this.$router.push({ name: '需求详情', params: { id: id + '' }})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -342,6 +374,7 @@ export default {
|
|
|
|
|
|
<style scoped>
|
|
|
.el-dropdown-link {
|
|
|
+ white-space: nowrap;
|
|
|
cursor: pointer;
|
|
|
color: #333333;
|
|
|
}
|
|
@@ -352,9 +385,7 @@ export default {
|
|
|
margin: 1%;
|
|
|
background-color: #ffffff;
|
|
|
border-radius: 8px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
+ line-height: 60px;
|
|
|
}
|
|
|
.requirement-main {
|
|
|
margin: 0 1%;
|
|
@@ -381,14 +412,17 @@ export default {
|
|
|
.requirement-header .el-input__inner {
|
|
|
border: none;
|
|
|
}
|
|
|
-#basicName1::-webkit-input-placeholder {
|
|
|
+#requirement_basicName1::-webkit-input-placeholder {
|
|
|
color: #333333;
|
|
|
}
|
|
|
-#basicName2::-webkit-input-placeholder {
|
|
|
+#requirement_basicName2::-webkit-input-placeholder {
|
|
|
color: #333333;
|
|
|
}
|
|
|
-#basicName3::-webkit-input-placeholder {
|
|
|
+#requirement_basicName3::-webkit-input-placeholder {
|
|
|
color: #333333;
|
|
|
}
|
|
|
.requirement-main .el-table .el-table__body tr:hover td { color: #409EFF; background: #EEF0F5; } /*hover时字体, 背景颜色*/
|
|
|
+.requirement_el-dropdown-menu {
|
|
|
+ max-height: 300px !important;
|
|
|
+ overflow: auto !important;}
|
|
|
</style>
|