流程管理接口问题调整

dev-scheduling
zhangdi 1 month ago
parent 4e7c71f7a2
commit 1751c8cb16
  1. 89
      src/views/flowManagement/addDialog.vue
  2. 41
      src/views/flowManagement/managementOfKeyTasks.vue
  3. 95
      src/views/flowManagement/milestoneDialog.vue

@ -206,7 +206,7 @@
align="center" align="center"
:width="isDetail ? '120' : ''" :width="isDetail ? '120' : ''"
label="里程碑负责人" label="里程碑负责人"
prop="milestoneMan" prop="milestoneMemo"
> >
<template #header> <template #header>
<span><i style="color: red">*</i>里程碑负责人</span> <span><i style="color: red">*</i>里程碑负责人</span>
@ -215,14 +215,15 @@
<template v-if="!isDetail"> <template v-if="!isDetail">
<el-form-item <el-form-item
label-width="0" label-width="0"
:prop="`stoneList[${scope.$index}].milestoneMan`" :prop="`stoneList[${scope.$index}].milestoneMemo`"
:rules="addRules.milestoneMan" :rules="addRules.milestoneMemo"
> >
<el-select <el-select
v-model="scope.row.milestoneMan" v-model="scope.row.milestoneMemo"
placeholder="请选择里程碑负责人" placeholder="请选择里程碑负责人"
clearable clearable
filterable filterable
@change="handleStoneListChange(scope.$index, scope.row, 'milestoneMemo')"
> >
<el-option <el-option
v-for="item in memberList" v-for="item in memberList"
@ -291,7 +292,9 @@
</el-form-item> </el-form-item>
</template> </template>
<template v-else> <template v-else>
<span>{{ scope.row.milestoneNode }}</span> <span>{{
scope.row.milestoneNode ? scope.row.milestoneNode.substring(0, 10) : ''
}}</span>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
@ -302,7 +305,12 @@
label="执行类型" label="执行类型"
prop="executeType" prop="executeType"
:width="isDetail ? '120' : ''" :width="isDetail ? '120' : ''"
></el-table-column> >
<template #default="scope">
<!-- {{ executeTypeFn(scope.row.executeType) }} -->
{{ scope.row.executeTypeText }}
</template>
</el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail"
align="center" align="center"
@ -316,7 +324,13 @@
label="核查结果" label="核查结果"
prop="checkResult" prop="checkResult"
:width="isDetail ? '120' : ''" :width="isDetail ? '120' : ''"
></el-table-column> >
<template #default="scope">
<span v-if="scope.row.checkResult === 0">未核查</span>
<span v-else-if="scope.row.checkResult === 1">已核查</span>
<span v-else-if="scope.row.checkResult === 2">已核准</span>
</template>
</el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail"
align="center" align="center"
@ -328,16 +342,21 @@
v-if="isDetail" v-if="isDetail"
align="center" align="center"
label="评价等级" label="评价等级"
prop="grade" prop="gradeTitle"
:width="isDetail ? '120' : ''" :width="isDetail ? '120' : ''"
></el-table-column> >
</el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail"
align="center" align="center"
label="评价人" label="评价人"
prop="gradeMan" prop="gradeMan"
:width="isDetail ? '120' : ''" :width="isDetail ? '120' : ''"
></el-table-column> >
<template #default="scope">
{{ scope.row.gradeTitle == '待评价' ? '' : scope.row.gradeMan }}
</template>
</el-table-column>
<el-table-column <el-table-column
v-if="isDetail" v-if="isDetail"
width="200" width="200"
@ -360,8 +379,8 @@
<!-- 弹窗底部按钮 --> <!-- 弹窗底部按钮 -->
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="handleClose"> </el-button> <el-button @click="handleClose" :loading="loadingShow"> </el-button>
<el-button type="primary" @click="handleSubmitForm"> </el-button> <el-button type="primary" @click="handleSubmitForm" :loading="loadingShow"> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -392,6 +411,7 @@ export default {
}, },
data() { data() {
return { return {
loadingShow:false,
formError: '', formError: '',
addRules: { addRules: {
projectName: [{ required: true, message: '请填写项目名称', trigger: ['blur', 'submit'] }], projectName: [{ required: true, message: '请填写项目名称', trigger: ['blur', 'submit'] }],
@ -440,7 +460,7 @@ export default {
milestonePlan: [ milestonePlan: [
{ required: true, message: '请填写里程碑计划', trigger: ['blur', 'submit'] }, { required: true, message: '请填写里程碑计划', trigger: ['blur', 'submit'] },
], ],
milestoneMan: [ milestoneMemo: [
{ required: true, message: '请选择里程碑负责人', trigger: ['change', 'submit'] }, { required: true, message: '请选择里程碑负责人', trigger: ['change', 'submit'] },
], ],
outputMaterial: [ outputMaterial: [
@ -457,6 +477,7 @@ export default {
addForm: { addForm: {
stoneList: [], stoneList: [],
}, },
executeResultList: [], //
}; };
}, },
computed: { computed: {
@ -472,9 +493,26 @@ export default {
this.getDeplList(); this.getDeplList();
if (this.title === '详情' || this.title === '修改') { if (this.title === '详情' || this.title === '修改') {
this.getDetails(); this.getDetails();
this.getExecuteResultList();
} }
}, },
methods: { methods: {
executeTypeFn(type) {
const item = this.executeResultList.find(item => item.dictKey === type);
return item ? item.dictValue : '';
},
getExecuteTypeText(type) {
const item = this.executeResultList.find(item => item.dictKey === type);
console.log('item', item);
return item ? item.dictValue : '';
},
handleStoneListChange(index, row, type) {
if (type === 'milestoneMemo') {
let sel = this.memberList.filter(item => item.id == row.milestoneMemo)[0];
this.addForm.stoneList[index].milestoneMan = sel.realName;
}
},
handleChange(type) { handleChange(type) {
// //
if (type == 'touchingDeptId') { if (type == 'touchingDeptId') {
@ -506,11 +544,22 @@ export default {
this.projectType = res.data.data; this.projectType = res.data.data;
}); });
}, },
//
getExecuteResultList() {
getDictionary({ code: 'flow_project_executeResult' }).then(res => {
this.executeResultList = res.data.data;
});
},
// //
getDetails() { getDetails() {
getProcessDetail(this.rowItem.id).then(res => { getProcessDetail(this.rowItem.id).then(res => {
console.log(res.data.data, 'res'); console.log(res.data.data, 'res');
this.addForm = res.data.data; this.addForm = res.data.data;
const records = res.data.data;
this.addForm.stoneList = records.stoneList.map(item => {
item.executeTypeText = this.getExecuteTypeText(item.executeType);
return item;
});
// memberName // memberName
if (res.data.data.memberName) { if (res.data.data.memberName) {
this.addForm.memberName = String(res.data.data.memberName) this.addForm.memberName = String(res.data.data.memberName)
@ -537,13 +586,12 @@ export default {
// //
handleOpenDialog() { handleOpenDialog() {
const newRow = { const newRow = {
id: 0, id: null,
fmProjectApplication: {}, fmProjectApplication: {},
attachList: [], // attachList: [], //
paId: 0, paId: 0,
paIndex: `${(this.addForm.stoneList?.length || 0) + 1}`, paIndex: `${(this.addForm.stoneList?.length || 0) + 1}`,
milestonePlan: '', milestonePlan: '',
milestoneMan: '',
outputMaterial: '', outputMaterial: '',
milestoneNode: '', milestoneNode: '',
milestoneMemo: '', milestoneMemo: '',
@ -610,6 +658,7 @@ export default {
}); });
return; return;
} }
this.loadingShow = true
const submitData = this.formatSubmitData(this.addForm); const submitData = this.formatSubmitData(this.addForm);
submitData.projectStartTime = submitData.projectStartTime + ' 00:00:00'; submitData.projectStartTime = submitData.projectStartTime + ' 00:00:00';
submitData.projectDesiredEnd = submitData.projectDesiredEnd + ' 00:00:00'; submitData.projectDesiredEnd = submitData.projectDesiredEnd + ' 00:00:00';
@ -617,13 +666,19 @@ export default {
updateProcess({ ...submitDat, approvalStatus: 1 }).then(res => { updateProcess({ ...submitDat, approvalStatus: 1 }).then(res => {
this.$message.success('修改成功'); this.$message.success('修改成功');
this.handleClose(true); this.handleClose(true);
}); this.loadingShow = false
}).catch(err=>{
this.loadingShow = false
})
return; return;
} else { } else {
addProcess({ ...submitData, approvalStatus: 1 }).then(res => { addProcess({ ...submitData, approvalStatus: 1 }).then(res => {
this.$message.success('提交成功'); this.$message.success('提交成功');
this.handleClose(true); this.handleClose(true);
}); this.loadingShow = false
}).catch(err=>{
this.loadingShow = false
})
} }
}); });
}, },

@ -58,7 +58,11 @@
{{ scope.row.milestoneNode ? scope.row.milestoneNode.substring(0, 10) : '' }} {{ scope.row.milestoneNode ? scope.row.milestoneNode.substring(0, 10) : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="执行类型" prop="executeType"> </el-table-column> <el-table-column align="center" label="执行类型" prop="executeType">
<template #default="scope">
{{ scope.row.executeTypeText }}
</template>
</el-table-column>
<!-- <el-table-column align="center" label="状态" prop="status"></el-table-column> --> <!-- <el-table-column align="center" label="状态" prop="status"></el-table-column> -->
<el-table-column align="center" label="延期时间" prop="delayTime"></el-table-column> <el-table-column align="center" label="延期时间" prop="delayTime"></el-table-column>
<el-table-column <el-table-column
@ -68,7 +72,11 @@
></el-table-column> ></el-table-column>
<el-table-column align="center" label="核查人" prop="checkMan"></el-table-column> <el-table-column align="center" label="核查人" prop="checkMan"></el-table-column>
<el-table-column align="center" label="评价等级" prop="gradeTitle"></el-table-column> <el-table-column align="center" label="评价等级" prop="gradeTitle"></el-table-column>
<el-table-column align="center" label="评价人" prop="gradeMan"></el-table-column> <el-table-column align="center" label="评价人" prop="gradeMan">
<template #default="scope">
{{ scope.row.gradeTitle == '待评价' ? '' : scope.row.gradeMan }}
</template>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="业务领导评价" label="业务领导评价"
@ -77,27 +85,21 @@
></el-table-column> ></el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template #default="scope"> <template #default="scope">
<!-- -->
<el-button <el-button
type="text" type="text"
v-if="row.approvalStatus == 3 && scope.row.checkResult == 0" v-if="row.approvalStatus == 3 && scope.row.checkResult == 0"
@click="executeRow(row, scope.row)" @click="executeRow(row, scope.row)"
>执行</el-button >执行</el-button
> >
<!-- -->
<el-button <el-button
type="text" type="text"
v-if=" v-if="scope.row.checkResult == 1 || scope.row.checkResult == 3"
(row.approvalStatus == 3 && (scope.row.checkResult == 1) ||
scope.row.checkResult == 3)
"
@click="auditRow(row, scope.row)" @click="auditRow(row, scope.row)"
>核查</el-button >核查</el-button
> >
<!-- -->
<el-button <el-button
type="text" type="text"
v-if="row.approvalStatus == 3 && scope.row.checkResult == 2" v-if="scope.row.gradeTitle=='待评价'&&scope.row.checkResult == 2"
@click="examineRow(row, scope.row)" @click="examineRow(row, scope.row)"
>核准</el-button >核准</el-button
> >
@ -300,10 +302,15 @@ export default {
this.getExecuteResult(); this.getExecuteResult();
}, },
methods: { methods: {
getExecuteTypeText(type) {
const item = this.executeResultList.find(item => item.dictKey === type);
console.log('item', item);
return item ? item.dictValue : '';
},
// flow_project_executeResult // flow_project_executeResult
getExecuteResult() { getExecuteResult() {
getDictionary({ code: 'flow_project_executeResult' }).then(res => { getDictionary({ code: 'flow_project_executeResult' }).then(res => {
this.executeResultList = res.data; this.executeResultList = res.data.data;
}); });
}, },
// flow_project_checkResult // flow_project_checkResult
@ -458,7 +465,17 @@ export default {
this.loading = true; this.loading = true;
getProcessList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then( getProcessList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(
res => { res => {
this.data = res.data.data.records; // this.data = res.data.data.records;
const records = res.data.data.records;
this.data = records.map(item => {
if (item.stoneList && Array.isArray(item.stoneList)) {
item.stoneList = item.stoneList.map(stone => ({
...stone,
executeTypeText: this.getExecuteTypeText(stone.executeType),
}));
}
return item;
});
this.loading = false; this.loading = false;
this.page.total = res.data.data.total; this.page.total = res.data.data.total;
} }

@ -47,6 +47,7 @@
<el-select <el-select
:disabled="subTitle == '核查' || subTitle == '核准'" :disabled="subTitle == '核查' || subTitle == '核准'"
v-model="detailForm.executeType" v-model="detailForm.executeType"
@change="executeTypeChange"
> >
<el-option <el-option
v-for="(item, index) in executeResultList" v-for="(item, index) in executeResultList"
@ -130,7 +131,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="核查人:" v-if="subTitle == '执行'"> <el-form-item label="核查人:" v-if="subTitle == '执行'">
<el-select v-model="detailForm.userId" clearable filterable> <el-select v-model="detailForm.userId" clearable filterable @change="handleUserChange">
<el-option <el-option
v-for="item in memberList" v-for="item in memberList"
:label="item.realName" :label="item.realName"
@ -190,8 +191,8 @@
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button> <el-button @click="closeDialog" :loading="loadingShow"> </el-button>
<el-button type="primary" @click="submit"> </el-button> <el-button type="primary" @click="submit" :loading="loadingShow"> </el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -222,6 +223,7 @@ export default {
}, },
data() { data() {
return { return {
loadingShow: false,
openShow: false, openShow: false,
memberList: [], memberList: [],
executeForm: {}, executeForm: {},
@ -239,12 +241,20 @@ export default {
this.openShow = this.showDialog; this.openShow = this.showDialog;
this.executeForm = this.rowItem; this.executeForm = this.rowItem;
console.log(this.detailForm, 'title'); console.log(this.detailForm, 'title');
this.detailForm.checkResult = null;
this.subTitle = this.title; this.subTitle = this.title;
console.log(this.rowItem, 'rowItem'); console.log(this.rowItem, 'rowItem');
this.getRoleUserList(); this.getRoleUserList();
this.getExecuteResult(); this.getExecuteResult();
}, },
methods: { methods: {
executeTypeChange() {
this.detailForm.delayTime = '';
},
handleUserChange() {
this.detailForm.checkMan =
this.memberList.find(item => item.id === this.detailForm.userId)?.realName || '';
},
getExecuteResult() { getExecuteResult() {
getDictionary({ code: 'flow_project_executeResult' }).then(res => { getDictionary({ code: 'flow_project_executeResult' }).then(res => {
this.executeResultList = res.data.data; this.executeResultList = res.data.data;
@ -263,9 +273,9 @@ export default {
submit() { submit() {
this.$refs.executeForm.validate(valid => { this.$refs.executeForm.validate(valid => {
if (valid) { if (valid) {
this.loadingShow = true;
// this.executeDialog = false; // this.executeDialog = false;
if (this.title == '执行') { if (this.title == '执行') {
this.executeForm.delayTime = this.executeForm.delayTime + ' 00:00:00';
let query_ = { let query_ = {
...this.detailForm, ...this.detailForm,
fmProjectApplication: { fmProjectApplication: {
@ -275,11 +285,17 @@ export default {
}; };
query_.checkResult = 1; query_.checkResult = 1;
query_.fmProjectApplication.approvalStatus = 4; query_.fmProjectApplication.approvalStatus = 4;
console.log(query_, 'query_'); query_.fmProjectApplication.delayTime =
projectExecute(query_).then(res => { query_.fmProjectApplication.delayTime + ' 00:00:00';
this.$message.success('操作成功!'); projectExecute(query_)
this.closeDialog(); .then(res => {
}); this.$message.success('操作成功!');
this.closeDialog();
this.loadingShow = false;
})
.catch(err => {
this.loadingShow = false;
});
} }
if (this.title == '核查') { if (this.title == '核查') {
let query_ = { let query_ = {
@ -289,17 +305,22 @@ export default {
}, },
// attachList: this.existingFiles, // attachList: this.existingFiles,
}; };
if (query_.checkResult == 2) { // if (query_.checkResult == 2) {
query_.fmProjectApplication.approvalStatus = 6; // query_.fmProjectApplication.approvalStatus = 6;
} // }
if (query_.checkResult == 3) { // if (query_.checkResult == 3) {
query_.fmProjectApplication.approvalStatus = 5; // query_.fmProjectApplication.approvalStatus = 5;
} // }
console.log(query_, '核查query_'); console.log(query_, '核查query_');
projectCheck(query_).then(res => { projectCheck(query_)
this.$message.success('操作成功!'); .then(res => {
this.closeDialog(); this.$message.success('操作成功!');
}); this.closeDialog();
this.loadingShow = false;
})
.catch(err => {
this.loadingShow = false;
});
} }
if (this.title == '核准') { if (this.title == '核准') {
let query_ = { let query_ = {
@ -314,20 +335,34 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(() => { })
// return removePersonAbility(row.id); .then(() => {
query_.fmProjectApplication.approvalStatus = 7; // return removePersonAbility(row.id);
projectApprove(query_).then(res => { // query_.fmProjectApplication.approvalStatus = 7;
projectApprove(query_)
.then(res => {
this.$message.success('操作成功!');
this.closeDialog();
this.loadingShow = false;
})
.catch(err => {
this.loadingShow = false;
});
})
.catch(() => {
this.loadingShow = false;
});
} else {
// query_.fmProjectApplication.approvalStatus = 8;
projectApprove(query_)
.then(res => {
this.$message.success('操作成功!'); this.$message.success('操作成功!');
this.closeDialog(); this.closeDialog();
this.loadingShow = false;
})
.catch(err => {
this.loadingShow = false;
}); });
});
} else {
query_.fmProjectApplication.approvalStatus = 8;
projectApprove(query_).then(res => {
this.$message.success('操作成功!');
this.closeDialog();
});
} }
} }
} }

Loading…
Cancel
Save