绩效修改

master
xy 1 year ago
parent 2204380c76
commit 6f3cfb049c

@ -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"
>
<el-form-item label="评价要点及评分规则" prop="evaluation_main" required={true}>
<el-input
type="textarea"
autosize={{
minRows: 3,
}}
v-model={row._form.evaluation_main}
size="small"
placeholder="请输入评价要点及评分规则"
></el-input>
</el-form-item>
{
this.type !== 1 ? (
<el-form-item label="评价要点及评分规则" prop="evaluation_main" required={true}>
<el-input
type="textarea"
autosize={{
minRows: 3,
}}
v-model={row._form.evaluation_main}
size="small"
placeholder="请输入评价要点及评分规则"
></el-input>
</el-form-item>
) : ""
}
<el-form-item label="实际完成值" prop="result" required={true}>
<el-form-item label={ this.type === 1 ? "半年实际执行值" : "实际完成值" } prop="result" required={true}>
<el-input
type="textarea"
autosize={{
@ -109,65 +143,99 @@ export default {
}}
v-model={row._form.result}
size="small"
placeholder="请输入实际完成值"
placeholder={ this.type === 1 ? "请输入半年实际执行值" : "请输入实际完成值" }
></el-input>
</el-form-item>
<el-form-item label="得分" prop="socre" required={true}>
<el-input-number
precision={2}
controls={false}
vModel={row._form.socre}
size="small"
min={0}
max={100}
placeholder="请输入自评值"
></el-input-number>
</el-form-item>
{
this.type !== 1 ? (
<el-form-item label="得分" prop="socre" required={true}>
<el-input-number
precision={2}
controls={false}
vModel={row._form.socre}
size="small"
min={0}
max={100}
placeholder="请输入自评值"
></el-input-number>
</el-form-item>
) : ""
}
<el-form-item label="备注及未完成指标原因分析">
<el-input
type="textarea"
autosize={{
minRows: 3,
}}
v-model={row._form.remark}
size="small"
placeholder="请输入备注及未完成指标原因分析"
></el-input>
</el-form-item>
{
this.type !== 1 ? (
<el-form-item label="备注及未完成指标原因分析">
<el-input
type="textarea"
autosize={{
minRows: 3,
}}
v-model={row._form.remark}
size="small"
placeholder="请输入备注及未完成指标原因分析"
></el-input>
</el-form-item>
) : ""
}
<el-form-item label="文件" required={true}>
<el-upload
style="width: 300px"
ref={`expand-form-upload${$index}`}
multiple={true}
headers={{
Authorization: "Bearer " + getToken(),
}}
before-upload={this.uploadBefore}
props={{
onSuccess: (response, file, fileList) => {
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}
>
<el-button slot="trigger" size="small" type="primary">
选取文件
</el-button>
<div slot="tip" className="el-upload__tip">
支持文件格式.rar .zip .doc .docx .xlsx .pdf .png .jpg
<br />
单个文件不能超过50Mb
</div>
</el-upload>
</el-form-item>
{
this.type === 1 ? (
<el-form-item label="是否偏差">
<el-switch v-model={row._form.is_deviation} active-text="" active-value={1} inactive-text="" inactive-value={0}></el-switch>
</el-form-item>
) : ""
}
{
this.type === 1 ? (
<el-form-item label="完成可能性">
<el-select size="small" v-model={row._form.end_possibility}>
{
["确定能", "有可能", "完全不可能"].map((item, index) => (
<el-option key={index} label={item} value={index}></el-option>
))
}
</el-select>
</el-form-item>
) : ""
}
{
this.type !== 1 ? (
<el-form-item label="文件" required={true}>
<el-upload
style="width: 300px"
ref={`expand-form-upload${$index}`}
multiple={true}
headers={{
Authorization: "Bearer " + getToken(),
}}
before-upload={this.uploadBefore}
props={{
onSuccess: (response, file, fileList) => {
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}
>
<el-button slot="trigger" size="small" type="primary">
选取文件
</el-button>
<div slot="tip" className="el-upload__tip">
支持文件格式.rar .zip .doc .docx .xlsx .pdf .png .jpg
<br />
单个文件不能超过50Mb
</div>
</el-upload>
</el-form-item>
) : ""
}
<el-form-item>
<el-button
@ -176,7 +244,7 @@ export default {
["click"]: (e) => {
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,
{

@ -3,7 +3,7 @@
<el-dialog :title="(type === 1 ? '年中' : '年末') + '自评表'" :visible.sync="isShow" width="54%">
<Tag v-if="form.year_middle_audit < 0 || form.year_end_audit < 0" color="warning"></Tag>
<el-form :model="form" size="small">
<el-form-item :label="(type === 1 ? '年中' : '年末') + '绩效等级'">
<el-form-item v-if="type !== 1" :label="(type === 1 ? '年中' : '年末') + '绩效等级'">
<el-input :value="type === 1 ? form.middle_achievement : form.end_achievement"
placeholder="绩效等级"
@input="e => {
@ -19,7 +19,7 @@
type === 1 ? form.year_midst = e : form.year_end = e
}"></el-input>
</el-form-item>
<el-form-item :label="(type === 1 ? '年中' : '年末') + '绩效目标完成情况'">
<el-form-item :label="(type === 1 ? '年中目标实现情况' : '年末绩效目标完成情况')">
<el-input :value="type === 1 ? form.middle_result : form.end_result"
type="textarea"
:autosize="{ minRows: 2 }"
@ -28,7 +28,7 @@
type === 1 ? form.middle_result = e : form.end_result = e
}"></el-input>
</el-form-item>
<el-form-item :label="(type === 1 ? '年中' : '年末') + '成效(通过绩效评价总结的成效)'">
<el-form-item v-if="type !== 1" :label="(type === 1 ? '年中' : '年末') + '成效(通过绩效评价总结的成效)'">
<el-input :value="type === 1 ? form.middle_effect : form.end_effect"
type="textarea"
:autosize="{ minRows: 2 }"
@ -37,7 +37,7 @@
type === 1 ? form.middle_effect = e : form.end_effect = e
}"></el-input>
</el-form-item>
<el-form-item :label="(type === 1 ? '年中' : '年末') + '问题 (按照决策、过程、履职、效益分别归类撰写)'">
<el-form-item :label="(type === 1 ? '年中偏差问题及原因(主要针对偏差指标)' : '年末问题 (按照决策、过程、履职、效益分别归类撰写)')">
<el-input :value="type === 1 ? form.middle_question : form.end_question"
type="textarea"
placeholder="(请结合指标扣分项进行阐述,准确分析问题原因)"

@ -61,12 +61,14 @@
<th>二级指标</th>
<th>三级指标</th>
<th style="min-width: 100px;">{{ type === 1 ? '半年' : '全年' }}指标值</th>
<th>实际完成值</th>
<th>分值</th>
<th>得分</th>
<th style="max-width: 30%;">评价要点及评分规则</th>
<th style="max-width: 24%;">未完成指标原因分析</th>
<th style="width: 46px;" class="no-export-xlsx">附件</th>
<th>{{ type === 1 ? '半年实际执行值' : '实际完成值' }}</th>
<th v-if="type === 1">/</th>
<th v-if="type === 1">//</th>
<th v-if="type !== 1"></th>
<th v-if="type !== 1"></th>
<th v-if="type !== 1" style="max-width: 30%;"></th>
<th v-if="type !== 1" style="max-width: 24%;"></th>
<th v-if="type !== 1" style="width: 46px;" class="no-export-xlsx"></th>
</tr>
<tr v-for="(item, index) in planTargetList" :key="item.id">
<td :rowspan="spanArr[index]" v-if="spanArr[index]" :style="{ 'display': spanArr[index] ? '' : 'none' }">{{ (item.target && item.target.target_type_detail) ? item.target.target_type_detail.name : '' }}</td>
@ -74,11 +76,13 @@
<td>{{ item.target ? item.target.name : '' }}</td>
<td>{{ targetValue(item) }}</td>
<td>{{ actResultFormat(item) }}</td>
<td>{{ item.score }}</td>
<td>{{ socre(item) }}</td>
<td style="max-width: 300px;">{{ evaluationMain(item) }}</td>
<td></td>
<td class="no-export-xlsx">
<td v-if="type === 1">{{ isDeviation(item) }}</td>
<td v-if="type === 1">{{ endPossibility(item) }}</td>
<td v-if="type !== 1">{{ item.score }}</td>
<td v-if="type !== 1">{{ socre(item) }}</td>
<td v-if="type !== 1" style="max-width: 300px;">{{ evaluationMain(item) }}</td>
<td v-if="type !== 1">{{ remark(item) }}</td>
<td class="no-export-xlsx" v-if="type !== 1">
<el-popover
placement="bottom-start"
title="附件"
@ -99,22 +103,22 @@
</el-popover>
</td>
</tr>
<tr>
<tr v-if="type !== 1">
<th colspan="5">合计</th>
<td>{{ targetTotal }}</td>
<td>{{ scoreTotal }}</td>
<th colspan="2"></th>
</tr>
<tr>
<tr v-if="type !== 1">
<th>绩效等级</th>
<td colspan="8">{{ type === 1 ? detail.middle_achievement : detail.end_achievement }}</td>
</tr>
<tr>
<tr v-if="type !== 1">
<th>主要成效通过绩效评价总结的成效</th>
<td colspan="8">{{ type === 1 ? detail.middle_effect : detail.end_effect }}</td>
</tr>
<tr>
<th>存在问题按照决策过程履职效益分别归类撰写</th>
<th>{{ type === 1 ? '偏差问题及原因(主要针对偏差指标)' : '存在问题(按照决策、过程、履职、效益分别归类撰写)' }}</th>
<td colspan="8">{{ type === 1 ? detail.middle_question : detail.end_question }}</td>
</tr>
<tr>
@ -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: {

@ -375,10 +375,10 @@
style="width: 300px"
>
<el-option
v-for="item in [1,2,3,4]"
:label="item"
:value="item"
:key="item"
v-for="item in dimensions"
:label="item.value"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
@ -581,10 +581,10 @@
style="width: 300px"
>
<el-option
v-for="item in [1,2,3,4]"
:label="item"
:value="item"
:key="item"
v-for="item in dimensions"
:label="item.value"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
@ -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,

Loading…
Cancel
Save