流程管理-项目管理-项目执行-新增排序/权限

dev-scheduling
ysn 1 month ago
parent fa3cc0b44c
commit f2c826767a
  1. 86
      src/views/flowManagement/projectExecution.vue

@ -14,28 +14,44 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
@sort-change="sortChange"
>
<template #menu-left> </template>
<template #menu="scope">
<el-button type="text" @click="handleView(scope.row)">详情</el-button>
<el-button type="text" @click="handleView(scope.row)" v-if="permissionList.detailsBtn">
详情
</el-button>
<el-button
type="text"
v-if="scope.row.approvalStatus == '3' && scope.row.checkResult == 0"
v-if="
scope.row.approvalStatus == '3' &&
scope.row.checkResult == 0 &&
permissionList.executeBtn
"
@click="executeRow(scope.row, scope.row)"
>执行</el-button
>
执行
</el-button>
<el-button
type="text"
v-if="scope.row.checkResult == 1 || scope.row.checkResult == 3"
v-if="
(scope.row.checkResult == 1 || scope.row.checkResult == 3) && permissionList.verifyBtn
"
@click="auditRow(scope.row, scope.row)"
>核查</el-button
>
核查
</el-button>
<el-button
type="text"
v-if="scope.row.gradeTitle == '待评价' && scope.row.checkResult == 2"
v-if="
scope.row.gradeTitle == '待评价' &&
scope.row.checkResult == 2 &&
permissionList.approveBtn
"
@click="examineRow(scope.row, scope.row)"
>核准</el-button
>
核准
</el-button>
</template>
<!-- 项目开始时间 -->
<template #projectStartTime="scope">
@ -48,7 +64,15 @@
{{ scope.row.milestoneNode ? scope.row.milestoneNode.substring(0, 10) : '' }}
</template>
<template #gradeMan="scope">
<span v-if="scope.row.gradeTitle == '优'||scope.row.gradeTitle=='良'||scope.row.gradeTitle=='中'">{{ scope.row.gradeMan }}</span>
<span
v-if="
scope.row.gradeTitle == '优' ||
scope.row.gradeTitle == '良' ||
scope.row.gradeTitle == '中'
"
>
{{ scope.row.gradeMan }}
</span>
</template>
<template #checkResultTitle="scope">
<span
@ -57,8 +81,9 @@
scope.row.checkResult == 3 ||
(scope.row.gradeTitle == '待评价' && scope.row.checkResult == 2)
"
>{{ scope.row.checkResultTitle }}</span
>
{{ scope.row.checkResultTitle }}
</span>
<span v-else></span>
</template>
<!-- <template #executeType="scope">
@ -93,6 +118,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() {
@ -114,7 +140,7 @@ export default {
form: {},
existingFiles: [], //
addForm: {},
query: {},
page: {
pageSize: 10,
currentPage: 1,
@ -170,6 +196,7 @@ export default {
prop: 'paCode',
overflow: true,
search: true,
sortable: 'custom',
width: 140,
},
{
@ -177,6 +204,7 @@ export default {
prop: 'projectName',
overflow: true,
search: true,
sortable: 'custom',
width: 140,
},
{
@ -184,6 +212,7 @@ export default {
prop: 'projectHead',
overflow: true,
search: false,
sortable: 'custom',
width: 140,
},
{
@ -191,6 +220,7 @@ export default {
prop: 'milestonePlan',
overflow: true,
search: true,
sortable: 'custom',
width: 190,
},
{
@ -198,6 +228,7 @@ export default {
prop: 'milestoneMan',
overflow: true,
search: false,
sortable: 'custom',
width: 140,
},
{
@ -205,6 +236,7 @@ export default {
prop: 'outputMaterial',
overflow: true,
search: false,
sortable: 'custom',
width: 190,
},
{
@ -212,6 +244,7 @@ export default {
prop: 'milestoneNode',
overflow: true,
search: true,
sortable: 'custom',
width: 120,
},
@ -220,6 +253,7 @@ export default {
prop: 'projectStartTime',
overflow: true,
search: false,
sortable: 'custom',
width: 140,
},
{
@ -227,6 +261,7 @@ export default {
prop: 'projectDesiredEnd',
overflow: true,
search: false,
sortable: 'custom',
width: 140,
},
{
@ -234,6 +269,7 @@ export default {
prop: 'executeTypeText',
overflow: true,
search: true,
// sortable: 'custom',
width: 140,
},
{
@ -241,6 +277,7 @@ export default {
prop: 'delayTime',
overflow: true,
search: false,
sortable: 'custom',
width: 140,
},
{
@ -248,6 +285,7 @@ export default {
prop: 'checkResultTitle',
overflow: true,
search: true,
// sortable: 'custom',
width: 140,
},
{
@ -255,6 +293,7 @@ export default {
prop: 'checkMan',
overflow: true,
search: false,
sortable: 'custom',
width: 140,
},
{
@ -262,6 +301,7 @@ export default {
prop: 'gradeTitle',
overflow: true,
search: true,
// sortable: 'custom',
width: 140,
},
{
@ -269,6 +309,7 @@ export default {
prop: 'gradeMan',
overflow: true,
search: false,
sortable: 'custom',
width: 140,
},
{
@ -276,6 +317,7 @@ export default {
prop: 'evaluate',
overflow: true,
search: false,
sortable: 'custom',
width: 140,
},
],
@ -286,6 +328,17 @@ export default {
gradeList: [], //
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
detailsBtn: this.validData(this.permission.projectExecution_details, false),
executeBtn: this.validData(this.permission.projectExecution_execute, false),
verifyBtn: this.validData(this.permission.projectExecution_verify, false),
approveBtn: this.validData(this.permission.projectExecution_approve, false),
};
},
},
mounted() {
this.getExecuteResult();
},
@ -326,7 +379,7 @@ export default {
//
handleView(row) {
this.title = '详情';
row.id=row.paId
row.id = row.paId;
this.rowItem = row;
this.addDialogVisible = true;
},
@ -430,6 +483,17 @@ 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;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {

Loading…
Cancel
Save