4 changed files with 322 additions and 13 deletions
@ -0,0 +1,11 @@ |
|||
|
|||
import request from '@/utils/request' |
|||
|
|||
// 查询项目进度
|
|||
export function listProjectProgress(query) { |
|||
return request({ |
|||
url: '/statistics/progress/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
@ -0,0 +1,276 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!-- 面包屑 --> |
|||
<el-breadcrumb separator="/" style="margin-bottom: 20px"> |
|||
<el-breadcrumb-item |
|||
v-for="(item, index) in routeList" |
|||
:key="item + index" |
|||
:to="{ path: item.path }" |
|||
>{{ item.routeName }}</el-breadcrumb-item |
|||
> |
|||
</el-breadcrumb> |
|||
|
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
label-width="68px" |
|||
> |
|||
<el-form-item label="项目类型" prop="projectType"> |
|||
<el-cascader |
|||
v-model="queryParams.data.projectType" |
|||
:options="projectTypeoptions" |
|||
:props="projectTypeOptionProps" |
|||
placeholder="请选择项目类型" |
|||
clearable |
|||
size="small" |
|||
style="width: 100%" |
|||
></el-cascader> |
|||
<!-- <el-select |
|||
v-model="queryParams.data.projectType" |
|||
placeholder="请选择项目类型" |
|||
@change="handleQuery" |
|||
clearable |
|||
size="small" |
|||
:popper-append-to-body="false" |
|||
> |
|||
<el-option-group |
|||
v-for="(group, index) in projectTypeoptions" |
|||
:key="group.label" |
|||
:label="group.label" |
|||
> |
|||
<el-option |
|||
v-for="dict in group.options" |
|||
:key="dict.dictValue + dict.dictLabel" |
|||
:label="dict.dictLabel" |
|||
:value="index + dict.dictValue" |
|||
> |
|||
</el-option> |
|||
</el-option-group> |
|||
</el-select> --> |
|||
</el-form-item> |
|||
<el-form-item label="项目名称" prop="projectName"> |
|||
<el-input |
|||
v-model="queryParams.data.projectName" |
|||
placeholder="请输入项目名称" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
> |
|||
<el-button |
|||
type="primary" |
|||
slot="append" |
|||
icon="el-icon-search" |
|||
size="small" |
|||
@click="handleQuery" |
|||
></el-button> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
|||
>重置</el-button |
|||
> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<el-row :gutter="10" class="mb8"> |
|||
<right-toolbar |
|||
:showSearch.sync="showSearch" |
|||
@queryTable="getList" |
|||
></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table v-loading="loading" :data="infoList"> |
|||
<!-- <el-table-column type="selection" width="55" align="center" fixed /> --> |
|||
<el-table-column |
|||
label="序号" |
|||
type="index" |
|||
width="50" |
|||
align="center" |
|||
fixed |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="项目名称" |
|||
align="center" |
|||
prop="projectName" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="项目类型" |
|||
align="center" |
|||
prop="projectType" |
|||
:formatter="projectTypeFormat" |
|||
min-width="120" |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="项目进展(%)" |
|||
align="center" |
|||
prop="yearlyCumulativeWorkload" |
|||
min-width="180" |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="时间" |
|||
align="center" |
|||
prop="updateTime" |
|||
min-width="180" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total > 0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { listProjectProgress } from "@/api/projectStatistics/progress"; |
|||
export default { |
|||
data() { |
|||
return { |
|||
// 面包屑,路由信息 |
|||
routeList: [ |
|||
{ |
|||
path: "/projectStatistics/projectStatisticsInvest", |
|||
routeName: "项目投资统计", |
|||
}, |
|||
], |
|||
infoList: [], |
|||
loading: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
total: 0, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: {}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}, |
|||
projectTypeOptionProps: { |
|||
emitPath: false, |
|||
checkStrictly: true, //选择任意一级 |
|||
}, |
|||
// 重大项目字典 |
|||
zd_projectTypeOptions: [], |
|||
// 面上项目字典 |
|||
ms_projectTypeOptions: [], |
|||
}; |
|||
}, |
|||
computed: { |
|||
projectTypeoptions() { |
|||
// let op = [ |
|||
// { |
|||
// label: "重大项目", |
|||
// options: this.zd_projectTypeOptions, |
|||
// }, |
|||
// { |
|||
// label: "面上项目", |
|||
// options: this.ms_projectTypeOptions, |
|||
// }, |
|||
// ]; |
|||
let op = [ |
|||
{ |
|||
label: "重大项目", |
|||
value: "zd, ", |
|||
children: this.zd_projectTypeOptions.map((item) => { |
|||
return { |
|||
label: item.dictLabel, |
|||
value: "zd," + item.dictValue, |
|||
}; |
|||
}), |
|||
}, |
|||
{ |
|||
label: "面上项目", |
|||
value: "ms, ", |
|||
children: this.ms_projectTypeOptions.map((item) => { |
|||
return { |
|||
label: item.dictLabel, |
|||
value: "ms," + item.dictValue, |
|||
}; |
|||
}), |
|||
}, |
|||
]; |
|||
// console.log(3333, op); |
|||
return op; |
|||
}, |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
this.getDicts("major_project").then((response) => { |
|||
this.zd_projectTypeOptions = response.data; |
|||
}); |
|||
this.getDicts("general_project").then((response) => { |
|||
this.ms_projectTypeOptions = response.data; |
|||
}); |
|||
}, |
|||
methods: { |
|||
getList() { |
|||
this.loading = true; |
|||
listProjectProgress(this.queryParams).then((res) => { |
|||
this.infoList = res.records; |
|||
// console.log(77777, res); |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 项目类型字典翻译 |
|||
projectTypeFormat(row, column) { |
|||
if (row.isMajor == "zd") { |
|||
return this.selectDictLabel( |
|||
this.zd_projectTypeOptions, |
|||
row.projectType |
|||
); |
|||
} else if (row.isMajor == "ms") { |
|||
return this.selectDictLabel( |
|||
this.ms_projectTypeOptions, |
|||
row.projectType |
|||
); |
|||
} |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: {}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}; |
|||
this.resetForm("queryForm"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
this.handleQuery(); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
Loading…
Reference in new issue