|
|
|
|
@ -14,21 +14,36 @@ |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
@sort-change="sortChange" |
|
|
|
|
> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<el-button type="primary" @click="handleAdd">新增</el-button> |
|
|
|
|
<el-button type="primary" @click="handleAdd" v-if="permissionList.addBtn"> 新增 </el-button> |
|
|
|
|
</template> |
|
|
|
|
<template #menu="{ row }"> |
|
|
|
|
<el-button type="text" @click="handleView(row)">详情</el-button> |
|
|
|
|
<el-button type="text" v-if="row.approvalStatus != 8" @click="handleEdit(row)" |
|
|
|
|
>修改</el-button |
|
|
|
|
<el-button type="text" @click="handleView(row)" v-if="permissionList.viewBtn"> |
|
|
|
|
详情 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="text" |
|
|
|
|
v-if="row.approvalStatus != 8 && permissionList.editBtn" |
|
|
|
|
@click="handleEdit(row)" |
|
|
|
|
> |
|
|
|
|
<el-button type="text" v-if="row.approvalStatus == 1" @click="checkRow(row)" |
|
|
|
|
>审核</el-button |
|
|
|
|
修改 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="text" |
|
|
|
|
v-if="row.approvalStatus == 1 && permissionList.reviewBtn" |
|
|
|
|
@click="checkRow(row)" |
|
|
|
|
> |
|
|
|
|
<el-button type="text" v-if="row.approvalStatus == 1" @click="deleteRow(row)" |
|
|
|
|
>删除</el-button |
|
|
|
|
审核 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="text" |
|
|
|
|
v-if="row.approvalStatus == 1 && permissionList.deleteBtn" |
|
|
|
|
@click="deleteRow(row)" |
|
|
|
|
> |
|
|
|
|
删除 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
<!-- 项目开始时间 --> |
|
|
|
|
<template #projectStartTime="scope"> |
|
|
|
|
@ -147,6 +162,7 @@ import AddDialog from './addDialog.vue'; |
|
|
|
|
import review from './review.vue'; |
|
|
|
|
import milestoneDialog from './milestoneDialog.vue'; |
|
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
export default { |
|
|
|
|
components: { AddDialog, review, milestoneDialog }, |
|
|
|
|
data() { |
|
|
|
|
@ -171,7 +187,7 @@ export default { |
|
|
|
|
form: {}, |
|
|
|
|
existingFiles: [], // 已有附件列表 |
|
|
|
|
addForm: {}, |
|
|
|
|
|
|
|
|
|
query: {}, |
|
|
|
|
page: { |
|
|
|
|
pageSize: 10, |
|
|
|
|
currentPage: 1, |
|
|
|
|
@ -227,12 +243,14 @@ export default { |
|
|
|
|
prop: 'paCode', |
|
|
|
|
overflow: true, |
|
|
|
|
search: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '项目名称', |
|
|
|
|
prop: 'projectName', |
|
|
|
|
overflow: true, |
|
|
|
|
search: true, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '项目负责人', |
|
|
|
|
@ -240,14 +258,16 @@ export default { |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
searchLabelWidth: 100, |
|
|
|
|
width: 100, |
|
|
|
|
width: 120, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '项目开始时间', |
|
|
|
|
prop: 'projectStartTime', |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
width: 110, |
|
|
|
|
width: 130, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '项目预期结束时间', |
|
|
|
|
@ -255,12 +275,14 @@ export default { |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
width: 140, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '制单人', |
|
|
|
|
prop: 'touchingMan', |
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '制单部门', |
|
|
|
|
@ -268,6 +290,7 @@ export default { |
|
|
|
|
|
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '制单时间', |
|
|
|
|
@ -275,10 +298,12 @@ export default { |
|
|
|
|
|
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
sortable: 'custom', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '状态', |
|
|
|
|
prop: 'approvalStatus', |
|
|
|
|
sortable: 'custom', |
|
|
|
|
|
|
|
|
|
overflow: true, |
|
|
|
|
search: false, |
|
|
|
|
@ -297,6 +322,18 @@ export default { |
|
|
|
|
gradeList: [], //评价等级 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(['permission']), |
|
|
|
|
permissionList() { |
|
|
|
|
return { |
|
|
|
|
addBtn: this.validData(this.permission.managementOfKeyTasks_add, false), |
|
|
|
|
viewBtn: this.validData(this.permission.managementOfKeyTasks_details, false), |
|
|
|
|
editBtn: this.validData(this.permission.managementOfKeyTasks_edit, false), |
|
|
|
|
reviewBtn: this.validData(this.permission.managementOfKeyTasks_review, false), |
|
|
|
|
deleteBtn: this.validData(this.permission.managementOfKeyTasks_del, false), |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.getExecuteResult(); |
|
|
|
|
}, |
|
|
|
|
@ -460,6 +497,16 @@ export default { |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
sortChange({ prop, order }) { |
|
|
|
|
this.query.descs = undefined; |
|
|
|
|
this.query.ascs = undefined; |
|
|
|
|
let orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; |
|
|
|
|
this.query[orderByFieldKey] = !prop |
|
|
|
|
? undefined |
|
|
|
|
: prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
|
|
|
|
// // 重新加载数据 |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
getProcessList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then( |
|
|
|
|
|