From 6f3cfb049cf79d805dd6e2dc25b707564795d6e7 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Tue, 2 Jul 2024 17:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A9=E6=95=88=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/addPlanEvaluate.vue | 210 ++++++++++++------ .../components/addSelfEvaluationForm.vue | 8 +- .../components/detailAchievements.vue | 55 +++-- src/views/budget/budgetList.vue | 38 +++- 4 files changed, 214 insertions(+), 97 deletions(-) diff --git a/src/views/achievements/components/addPlanEvaluate.vue b/src/views/achievements/components/addPlanEvaluate.vue index f57f006..38e0b11 100644 --- a/src/views/achievements/components/addPlanEvaluate.vue +++ b/src/views/achievements/components/addPlanEvaluate.vue @@ -83,25 +83,59 @@ export default { ref={`expand-form${$index}`} props={{ model: row._form }} rules={{ - socre: [{ required: true, message: "请输入自评值", trigger: "blur" }], - evaluation_main: [{ required: true, message: "请输入评价要点及评分规则", trigger: "blur" }], + socre: [ + { + validator: (rule, value, callback) => { + if (this.type === 1) { + callback() + } else { + if (value) { + callback() + } else { + callback(new Error("请输入自评值")) + } + } + }, + trigger: "blur" + } + ], + evaluation_main: [ + { + validator: (rule, value, callback) => { + if (this.type === 1) { + callback() + } else { + if (value) { + callback() + } else { + callback(new Error("请输入评价要点及评分规则")) + } + } + }, + trigger: "blur" + } + ], result: [{ required: true, message: "请输入实际完成值", trigger: "blur" }], }} label-width="120px" > - - - + { + this.type !== 1 ? ( + + + + ) : "" + } - + - - - + { + this.type !== 1 ? ( + + + + ) : "" + } - - - + { + this.type !== 1 ? ( + + + + ) : "" + } - - { - this.successHandle(response, file, fileList, row); - }, - onRemove: (file, fileList) => { - this.removeHande(file, fileList, row); - }, - }} - accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,image/*,application/x-rar-compressed,application/zip,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf" - action={this.action} - file-list={row._fileList} - > - - 选取文件 - -
- 支持文件格式:.rar .zip .doc .docx .xlsx .pdf .png .jpg -
- 单个文件不能超过50Mb -
-
-
+ { + this.type === 1 ? ( + + + + ) : "" + } + + { + this.type === 1 ? ( + + + { + ["确定能", "有可能", "完全不可能"].map((item, index) => ( + + )) + } + + + ) : "" + } + + { + this.type !== 1 ? ( + + { + this.successHandle(response, file, fileList, row); + }, + onRemove: (file, fileList) => { + this.removeHande(file, fileList, row); + }, + }} + accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,image/*,application/x-rar-compressed,application/zip,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf" + action={this.action} + file-list={row._fileList} + > + + 选取文件 + +
+ 支持文件格式:.rar .zip .doc .docx .xlsx .pdf .png .jpg +
+ 单个文件不能超过50Mb +
+
+
+ ) : "" + } { this.$refs[`expand-form${$index}`].validate((valid) => { if (valid) { - if (!row._fileList || row._fileList.length === 0) { + if ((!row._fileList || row._fileList.length === 0) && this.type !== 1) { this.$message({ type: "warning", message: "请上传文件", @@ -353,6 +421,8 @@ export default { result: "", remark: "", type: this.type, + is_deviation: 0, + end_possibility: 1, file_ids: [], plan_id: this.getPlanId(), plan_target_id: item.id, @@ -390,7 +460,7 @@ export default { }, computed: { tableItem () { - let temp = this.table + let temp = this.type return [ ...this.table, { diff --git a/src/views/achievements/components/addSelfEvaluationForm.vue b/src/views/achievements/components/addSelfEvaluationForm.vue index 37322d7..6c76654 100644 --- a/src/views/achievements/components/addSelfEvaluationForm.vue +++ b/src/views/achievements/components/addSelfEvaluationForm.vue @@ -3,7 +3,7 @@ 审核驳回 - + - + - + - + 二级指标 三级指标 {{ type === 1 ? '半年' : '全年' }}(程)指标值 - 实际完成值 - 分值 - 得分 - 评价要点及评分规则 - 未完成指标原因分析 - 附件 + {{ type === 1 ? '半年实际执行值' : '实际完成值' }} + 是否偏差(是/否) + 完成可能性(确定能/有可能/完全不可能) + 分值 + 得分 + 评价要点及评分规则 + 未完成指标原因分析 + 附件 {{ (item.target && item.target.target_type_detail) ? item.target.target_type_detail.name : '' }} @@ -74,11 +76,13 @@ {{ item.target ? item.target.name : '' }} {{ targetValue(item) }} {{ actResultFormat(item) }} - {{ item.score }} - {{ socre(item) }} - {{ evaluationMain(item) }} - - + {{ isDeviation(item) }} + {{ endPossibility(item) }} + {{ item.score }} + {{ socre(item) }} + {{ evaluationMain(item) }} + {{ remark(item) }} + - + 合计 {{ targetTotal }} {{ scoreTotal }} - + 绩效等级 {{ type === 1 ? detail.middle_achievement : detail.end_achievement }} - + 主要成效(通过绩效评价总结的成效) {{ type === 1 ? detail.middle_effect : detail.end_effect }} - 存在问题(按照决策、过程、履职、效益分别归类撰写) + {{ type === 1 ? '偏差问题及原因(主要针对偏差指标)' : '存在问题(按照决策、过程、履职、效益分别归类撰写)' }} {{ type === 1 ? detail.middle_question : detail.end_question }} @@ -272,6 +276,21 @@ export default { } } }, + isDeviation () { + return function(item) { + return item.plan_evaluates?.find(j => (j.plan_target_id === item.id && j.type === this.type))?.is_deviation ? '是' : '否' + } + }, + endPossibility () { + const type = new Map([ + [0, '确定能'], + [1, '有可能'], + [2, '完全不可能'] + ]) + return function(item) { + return type.get(item.plan_evaluates?.find(j => (j.plan_target_id === item.id && j.type === this.type))?.end_possibility) + } + }, actResultFormat () { return function(item) { return item.plan_evaluates?.find(j => (j.plan_target_id === item.id && j.type === this.type))?.result @@ -302,6 +321,12 @@ export default { return this.planTargetList.reduce((pre, cur) => { return pre + (parseFloat(cur?.plan_evaluates?.find(j => (j.plan_target_id === cur.id && j.type === this.type))?.socre) || 0) }, 0).toFixed(2) + }, + + remark () { + return function(item) { + return item.plan_evaluates?.find(j => (j.plan_target_id === item.id && j.type === this.type))?.remark + } } }, watch: { diff --git a/src/views/budget/budgetList.vue b/src/views/budget/budgetList.vue index 3567bfc..3e2397b 100644 --- a/src/views/budget/budgetList.vue +++ b/src/views/budget/budgetList.vue @@ -375,10 +375,10 @@ style="width: 300px" > @@ -581,10 +581,10 @@ style="width: 300px" > @@ -917,6 +917,28 @@ export default { type_pid: "", }, departments: [], //部门类型 + dimensions: [ + { + value: "年初部门预算", + id: "1" + }, + { + value: "年中追加部门预算", + id: "2" + }, + { + value: "上年结转资金", + id: "3" + }, + { + value: "基本户资金", + id: "4" + }, + { + value: "其他", + id: "5" + } + ], //编辑信息 isShowEditor: false,