Commit bd976fd9 authored by 王鑫's avatar 王鑫

feat: 项目成本表添加项目状态

parent c5122f12
......@@ -22,6 +22,31 @@
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item
label="项目状态"
:labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }"
>
<a-select style="width: 150px" @change="onStatusChange">
<a-select-option value="unfinished">
未完成
</a-select-option>
<a-select-option value="wait">
未开始
</a-select-option>
<a-select-option value="doing">
进行中
</a-select-option>
<a-select-option value="suspended">
已挂起
</a-select-option>
<a-select-option value="closed">
已关闭
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
......@@ -46,6 +71,9 @@
</a-button-group>
</div>
</div>
<div slot="projectStatus" slot-scope="text">
<a-tag :color="colorMap[text]">{{text}}</a-tag>
</div>
</a-table>
</div>
</a-card>
......@@ -57,6 +85,13 @@ import { formatDate } from "@/util/util";
const dataSource = [];
const columns = [
{ title: "名称", dataIndex: "name", align: "left" },
{
title: "项目状态",
width: 130,
dataIndex: "projectStatus",
align: "center",
scopedSlots: { customRender: 'projectStatus' },
},
{
title: "最早登记时间",
width: 130,
......@@ -87,6 +122,7 @@ export default {
isFirstLoad: true,
query: {
projectName: "",
projectStatus:"",
beginDate: null,
endDate: null,
},
......@@ -95,6 +131,12 @@ export default {
loading: false,
columns: columns,
dataSource: dataSource,
colorMap :{
"未开始": "cyan",
"进行中": "green",
"已挂起": "orange",
"已关闭": "red",
}
};
},
methods: {
......@@ -104,6 +146,10 @@ export default {
this.query.endDate = dateString[1];
}
},
onStatusChange(value){
console.log(value)
this.query.projectStatus = value;
},
search() {
this.loadData();
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment