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

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

View File

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