项目管理调整,需求管理起步编写

v1.2.0
rdpnr_hemingxia 2025-03-21 18:00:39 +08:00
parent 5327adc0ea
commit 338b1ef8bd
3 changed files with 70 additions and 43 deletions

View File

@ -196,4 +196,11 @@ export const taskApi = {
}
export const demandApi = {
getDemandTree: (data) => request({
url: `/projectVersion/tree`,
method: 'get',
params: data,
}),
} }

View File

@ -1,5 +1,15 @@
<template> <template>
<div class="project-list"> <div class="project-list">
<div class="table-actions mb10" style="text-align: right;">
<el-button
type="primary"
size="mini"
@click="addProject"
v-hasPermi="['project:list:add']"
style="height: 30px;"
>+ 新建项目</el-button
>
</div>
<div class="search-bar"> <div class="search-bar">
<el-form <el-form
:inline="true" :inline="true"
@ -33,23 +43,14 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="search-buttons"> <el-form-item class="formBtn">
<el-button type="primary" @click="onSearch"></el-button> <el-button type="primary" size="medium" @click="onSearch"></el-button>
<el-button @click="onReset"></el-button> <el-button @click="onReset" size="medium">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="table-actions mb10">
<el-button
type="primary"
size="mini"
@click="addProject"
v-hasPermi="['project:list:add']"
style="height: 36px;"
>+ 新建项目</el-button
>
</div>
<div class="f1 df"> <div class="f1 df">
<CustomTable <CustomTable
:columns="columns" :columns="columns"
@ -64,6 +65,13 @@
> >
<template slot="operation" slot-scope="{ row }"> <template slot="operation" slot-scope="{ row }">
<div class="operation-buttons"> <div class="operation-buttons">
<el-button
@click="handleDemand(row)"
type="text"
size="mini"
v-hasPermi="['project:list:demand']"
>需求管理</el-button
>
<el-button <el-button
@click="handleEdit(row)" @click="handleEdit(row)"
type="text" type="text"
@ -76,6 +84,7 @@
size="mini" size="mini"
@click="handleDelete(row)" @click="handleDelete(row)"
v-hasPermi="['project:list:delete']" v-hasPermi="['project:list:delete']"
style="color: #666;"
>删除</el-button >删除</el-button
> >
</div> </div>
@ -134,34 +143,25 @@ export default {
callback: (value) => { callback: (value) => {
let status = this.statusList.find( let status = this.statusList.find(
(ele) => ele.dictValue == value (ele) => ele.dictValue == value
)?.dictLabel; )?.dictLabel||'';
let color = "#333"; let color = "#333";
// switch (status) { switch (status) {
// case "": case "待启动":
// color = "#fa721d"; // color = "#999999"; //
// break; break;
// case "-": case "进行中":
// color = "#dd242a"; // color = "#FF7D00"; //
// break; break;
// case "-": case "已完成":
// color = "#1686d8"; // 绿 color = "#50B6AA"; // 绿
// break; break;
// case "-": case "#50B6AA":
// color = "#5cb85c"; // color = "#999999"; //
// break; break;
// case "-": default:
// color = "#f7c731"; // color = "#333"; //
// break; break;
// case "-": }
// color = "#8C33FF"; //
// break;
// case "-":
// color = "#08fb9e"; // 绿
// break;
// default:
// color = "#000"; //
// break;
// }
return `<span style="color: ${color}">${status}</span>`; return `<span style="color: ${color}">${status}</span>`;
}, },
}, },
@ -170,7 +170,7 @@ export default {
{ {
prop: "operation", prop: "operation",
label: "操作", label: "操作",
width: "150", width: "250",
fixed: "right", fixed: "right",
className: "operation-column", className: "operation-column",
}, },
@ -201,6 +201,13 @@ export default {
path: "/project/detail", path: "/project/detail",
}); });
}, },
handleDemand(row){
this.$router.push({
path: "/demandManage",
query: { id: row.projectId },
});
},
handleEdit(row) { handleEdit(row) {
this.$router.push({ this.$router.push({
path: "/project/detail", path: "/project/detail",
@ -287,8 +294,16 @@ export default {
.demo-form-inline .el-form-item { .demo-form-inline .el-form-item {
// margin-right: 50px; /* 30px */ // margin-right: 50px; /* 30px */
margin-bottom: 0; margin-bottom: 0;
border: 1px solid #ccc;
padding-left: 10px;
border-radius: 4px;
::v-deep .el-form-item__label{
color: #999 !important;
}
}
.formBtn{
border: none !important;
} }
.demo-form-inline .el-form-item:last-child { .demo-form-inline .el-form-item:last-child {
margin-right: 0; /* 移除最后一个元素的右边距 */ margin-right: 0; /* 移除最后一个元素的右边距 */
} }
@ -304,10 +319,15 @@ export default {
.form-item ::v-deep .el-input, .form-item ::v-deep .el-input,
.form-item ::v-deep .el-select { .form-item ::v-deep .el-select {
// width: 100%; // width: 100%;
input,select{
border: none !important;
}
} }
.search-buttons { .search-buttons {
white-space: nowrap; white-space: nowrap;
} }
::v-deep .operation-buttons .el-button { ::v-deep .operation-buttons .el-button {

View File

@ -74,7 +74,7 @@ import { projectBank, projectApi } from "@/utils/api";
export default { export default {
name: "ProjectUser", name: "ProjectUser",
components: { components: {
CustomTable, CustomTable,
}, },
data() { data() {
return { return {