xy 2 years ago
parent 71e84e1f87
commit 65f5d28c5e

@ -1,7 +1,7 @@
<template>
<div>
<el-drawer
size="46%"
size="56%"
:title="type === 1 ? '年中绩效指标' : '年末绩效指标'"
:visible.sync="isShow"
direction="rtl"
@ -55,10 +55,14 @@ import { save, show, index as evaluateIndex } from "@/api/achievements/evaluate"
import { deepCopy, resetSelect } from '@/utils'
import { getToken } from "@/utils/auth";
import { editorBudget } from '@/api/budget/budget'
import { getparameter } from '@/api/system/dictionary'
export default {
data() {
return {
symbols: [],
units: [],
isPid0: false,
isShow: false,
type: 1,
action: process.env.VUE_APP_UPLOAD_API,
@ -70,14 +74,15 @@ export default {
width: 80,
label: "自评展开",
expandFn: ({ row, $index, store }) => {
row._form.score = row.score
return (
<div class="expand">
<el-form
ref={`expand-form${$index}`}
props={{ model: row._form }}
label-width="80px"
label-width="120px"
>
<el-form-item label="自评值" required={true}>
<el-form-item label="实际完成值" required={true}>
<el-input
type="textarea"
autosize={{
@ -85,16 +90,16 @@ export default {
}}
v-model={row._form.result}
size="small"
placeholder="请输入自评值"
placeholder="请输入实际完成值"
></el-input>
</el-form-item>
<el-form-item label="得分" required={true}>
<el-input-number
type="textarea"
disabled={this.isPid0}
precision={2}
controls={false}
vModel={row._form.result}
vModel={row._form.score}
size="small"
placeholder="请输入自评值"
></el-input-number>
@ -194,6 +199,35 @@ export default {
prop: "target.name",
minWidth: 200,
},
{
label: "评价方式",
prop: "target.evaluation_way",
minWidth: 180
},
{
label: "是否固定指标项目",
prop: "is_fixed",
width: 120,
formatter(row,data,val) {
return val? '是' : '否';
}
},
{
label: "计算符号",
prop: "target.symbol_id",
width: 120,
formatter: (cel,data,val) => {
return this.symbols.find(i => i.id === val)?.value
}
},
{
label: "单位",
prop: "target.unit_id",
width: 120,
formatter: (cel,data,val) => {
return this.units.find(i => i.id === val)?.value
}
},
{
label: "半年(程)指标值",
prop: "target.half_target",
@ -243,7 +277,6 @@ export default {
row._fileList = fileList;
},
uploadBefore(file) {
console.log(file);
if (file.size / 1024 > 500) {
this.$message({
type: "warning",
@ -273,7 +306,6 @@ export default {
},
expandChange({ row, expanded }) {
console.log(row, expanded)
if(expanded.indexOf(row) !== -1) {
evaluateIndex({
type: this.type,
@ -338,6 +370,14 @@ export default {
})
},
async getSymbols() {
const res = await getparameter( { number: "symbol" })
this.symbols = res.detail
},
async getUnits() {
const res = await getparameter({ number: "unit" })
this.units = res.detail
},
submit() {},
},
computed: {},
@ -349,6 +389,10 @@ export default {
}
},
},
created() {
this.getSymbols()
this.getUnits()
}
};
</script>

@ -20,6 +20,7 @@
</div>
<div class="xy-table-item-content">
<el-select
:popper-append-to-body="false"
value-key="id"
:value="typeFormat"
clearable
@ -50,6 +51,7 @@
</div>
<div class="xy-table-item-content">
<el-select
:popper-append-to-body="false"
v-model="form.target_type2_id"
clearable
placeholder="请选择二级指标"
@ -93,6 +95,7 @@
</div>
<div class="xy-table-item-content">
<el-select
:popper-append-to-body="false"
v-model="form.unit_id"
clearable
placeholder="请选择单位"
@ -118,6 +121,7 @@
</div>
<div class="xy-table-item-content">
<el-select
:popper-append-to-body="false"
ref="symbolSelect"
v-model="form.symbol_id"
clearable

@ -56,6 +56,13 @@ export default {
}
},
methods: {
async getDetail() {
const res = await detailBudget({
id: this.id
})
this.$integrateData(this.form, res)
},
setForm () {
this.form = this.type === 1 ? {
middle_achievement: "",
@ -103,6 +110,7 @@ export default {
isShow(val) {
if(val) {
this.setForm()
this.getDetail()
}else{
this.form = {}
}

@ -64,6 +64,21 @@
</div>
</div>
</template>
<template #score>
<div class="xy-table-item">
<div class="xy-table-item-label">分值 </div>
<div class="xy-table-item-content">
<el-input-number
v-model="form.score"
clearable
:controls="false"
:precision="2"
placeholder="请输入备注"
style="width: 300px"
></el-input-number>
</div>
</div>
</template>
<template v-slot:sort>
<div class="xy-table-item">
<div class="xy-table-item-label">排序 </div>
@ -104,6 +119,7 @@ export default {
pid: "",
name: "",
remark: "",
score: 0,
sort: "",
},
rules: {

@ -41,10 +41,12 @@
<template v-slot:default="scope">
<el-dropdown @command="command => {
if (command === 'yearMiddle') {
$refs['addPlanEvaluate'].isPid0 = scope.row.pid === 0;
$refs['addPlanEvaluate'].type = 1;
$refs['addPlanEvaluate'].setPlanId(scope.row.id);
$refs['addPlanEvaluate'].show();
} else {
$refs['addPlanEvaluate'].isPid0 = scope.row.pid === 0;
$refs['addPlanEvaluate'].type = 2;
$refs['addPlanEvaluate'].setPlanId(scope.row.id);
$refs['addPlanEvaluate'].show();
@ -153,7 +155,7 @@ export default {
keyword: "",
page: 1,
page_size: 10,
top_pid: 0,
pid: 0,
},
total: 0,
table: [

@ -84,6 +84,11 @@ export default {
minWidth: 220,
align: "left"
},
{
label: "分值",
prop: "score",
width: 100,
},
{
label: "创建时间",
prop: "created_at",

@ -131,7 +131,7 @@
>
<template slot-scope="scope">
<div class="slot-btns">
<Tag color="blue" v-if="scope.row.pid === 0">{{ pScore(scope.row) }}</Tag>
<!-- <Tag color="blue" v-if="scope.row.pid === 0">{{ pScore(scope.row) }}</Tag>-->
<Button
class="slot-btns-item"
size="small"
@ -210,7 +210,7 @@
>
<template slot-scope="scope">
<div class="slot-btns">
<Tag color="blue" v-if="scope.row.pid === 0">{{ pScore(scope.row) }}</Tag>
<!-- <Tag color="blue" v-if="scope.row.pid === 0">{{ pScore(scope.row) }}</Tag>-->
<Button
class="slot-btns-item"
size="small"

@ -64,7 +64,7 @@
</span>
</el-dialog>
<addPoint ref="addPoint"></addPoint>
<addPoint ref="addPoint" :unit_ids="units" :symbol_ids="symbols" :target_types="types"></addPoint>
</div>
</template>
@ -73,12 +73,18 @@ import { index, save, destroy } from "@/api/budget/planTarget";
import { index as pointIndex } from "@/api/achievements/points";
import { resetSelect } from "@/utils";
import addPoint from "@/views/achievements/components/addPoint.vue"
import { index as typesIndex } from '@/api/achievements/types'
import { getparameter } from '@/api/system/dictionary'
export default {
components: {
addPoint
},
data() {
return {
types: [],
symbols: [],
units: [],
planPid: 0,
isShow: false,
@ -279,6 +285,19 @@ export default {
};
},
methods: {
async getTypes() {
const res = await typesIndex({ show_tree:1 })
this.types = res || []
},
async getSymbols() {
const res = await getparameter( { number: "symbol" })
this.symbols = res.detail
},
async getUnits() {
const res = await getparameter({ number: "unit" })
this.units = res.detail
},
show() {
this.isShow = true;
},
@ -420,6 +439,11 @@ export default {
}
},
},
created() {
this.getTypes();
this.getSymbols();
this.getUnits();
}
};
</script>

Loading…
Cancel
Save