xy 2 years ago
parent 8ed8d70981
commit 6494086e5e

@ -6,6 +6,7 @@
:visible.sync="isShow"
direction="rtl"
>
<Tag style="margin-left: 20px;margin-bottom: 10px;" color="primary">绩效总分{{ totalScore }}</Tag>
<xy-table
ref="table"
:list="list"
@ -73,7 +74,9 @@ export default {
width: 80,
label: "自评展开",
expandFn: ({ row, $index, store }) => {
row._form.score = row.score
if (!row._form.socre || row._form.socre == 0) {
row._form.socre = row.score
}
return (
<div class="expand">
<el-form
@ -97,7 +100,7 @@ export default {
<el-input-number
precision={2}
controls={false}
vModel={row._form.score}
vModel={row._form.socre}
size="small"
min={0}
max={100}
@ -156,7 +159,7 @@ export default {
<div slot="tip" className="el-upload__tip">
支持文件格式.rar .zip .doc .docx .pdf
<br />
单个文件不能超过500kb
单个文件不能超过2Mb
</div>
</el-upload>
</el-form-item>
@ -172,6 +175,8 @@ export default {
type: "success",
message: "操作成功"
})
this.getList()
})
},
}}
@ -194,6 +199,20 @@ export default {
);
},
},
{
label: "是否完成",
width: 100,
customFn: row => {
const isComplete = row.plan_evaluates.findIndex(j => (row.id === j.plan_target_id) && (j.type === this.type)) !== -1;
return (
<div style={{'color': isComplete ? 'green' : 'red'}}>{
isComplete ? '是' : '否'
}</div>
)
}
},
{
label: "分值",
prop: "target.score",
@ -306,23 +325,26 @@ export default {
},
async getList() {
this.list = [];
const res = await index(this.select);
this.list = res.data.map((item) => {
return {
_form: {
id: "",
score: "",
result: "",
remark: "",
type: this.type,
file_ids: [],
plan_id: this.getPlanId(),
plan_target_id: item.id,
},
_fileList: [],
...item,
};
});
if (res.data instanceof Array) {
this.list = res.data.map((item) => {
return {
_form: {
id: "",
socre: "",
result: "",
remark: "",
type: this.type,
file_ids: [],
plan_id: this.getPlanId(),
plan_target_id: item.id,
},
_fileList: [],
...item,
};
});
}
console.log(this.list);
},
@ -368,6 +390,12 @@ export default {
)
}
]
},
totalScore () {
return this.list instanceof Array ? this.list.reduce((pre, cur) => {
return pre + (Number(cur?.plan_evaluates?.find(j => (j.plan_target_id === cur.id) && (j.type === this.type))?.socre) || 0)
},0) : 0
}
},
watch: {

@ -236,6 +236,7 @@
</template>
<script>
import { save as planTargetSave } from "@/api/budget/planTarget";
import { show, save } from "@/api/achievements/points";
import { PopupManager } from "element-ui/src/utils/popup"
export default {
@ -390,6 +391,9 @@ export default {
});
}
save(this.form).then((res) => {
if (/\/budgetList/g.test(this.$route.path) && this.type === 'add') {
this.$emit('savePlanTarget',res)
}
this.$message({
type: "success",
message:

@ -0,0 +1,17 @@
<template>
<div>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
computed: {}
}
</script>
<style scoped lang="scss">
</style>

@ -9,6 +9,24 @@
<slot>
<div class="selects">
<div>
<span style="padding: 0 6px">名称</span>
<span><el-input
v-model="select.name"
placeholder="请输入名称"
style="width: 130px"
size="small"
></el-input></span>
<span style="padding: 0 6px">年份</span>
<span>
<DatePicker
:value="select.year"
placeholder="选择所属年份"
placement="bottom"
style="width: 130px"
type="year"
@on-change="(e) => (select.year = e)"
></DatePicker>
</span>
<span style="padding: 0 6px; word-break: keep-all"> 关键字 </span>
<Input
v-model="select.keyword"
@ -150,6 +168,8 @@ export default {
return {
budgetTypes: [],
select: {
name: "",
year: new Date().getFullYear(),
keyword: "",
page: 1,
page_size: 10,

@ -0,0 +1,107 @@
<template>
<div style="padding: 0 20px">
<lx-header
icon="md-apps"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
text="年中绩效审核"
>
<div slot="content"></div>
<slot>
<div class="selects">
<div>
<span style="padding: 0 6px">名称</span>
<span><el-input
v-model="select.name"
placeholder="请输入名称"
style="width: 130px"
size="small"
></el-input></span>
<span style="padding: 0 6px">年份</span>
<span>
<DatePicker
:value="select.year"
placeholder="选择所属年份"
placement="bottom"
style="width: 130px"
type="year"
@on-change="(e) => (select.year = e)"
></DatePicker>
</span>
<span style="padding: 0 6px; word-break: keep-all"> 关键字 </span>
<Input
v-model="select.keyword"
placeholder="请输入关键字"
style="width: 180px"
></Input>
</div>
<Button style="margin-left: 10px" type="primary" @click=""
>重置
</Button>
<Button
style="margin-left: 10px"
type="primary"
@click="(select.page = 1), getList()"
>查询</Button
>
</div>
</slot>
</lx-header>
<xy-table :list="list" :table-item="table">
<template v-slot:btns>
<el-table-column
label="操作"
header-align="center"
fixed="right"
width="210"
>
<template v-slot:default="scope">
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total"
@on-change="e => {
select.page = e;
getList()
}"
show-elevator
show-sizer
@on-page-size-change="e => {
select.page_size = e;
select.page = 1;
getList()
}" />
</div>
</div>
</template>
<script>
export default {
data() {
return {
select: {
},
total: 0,
list: [],
table: []
}
},
methods: {
getList () {
}
},
computed: {}
}
</script>
<style scoped lang="scss">
</style>

@ -150,21 +150,22 @@ export default {
},
async getList() {
this.list = [];
this.pos = this.pos1 = 0;
this.spanArr = [];
this.spanArr1 = [];
const res = await index(this.select)
this.total = res.total
this.list = res.data
let temp = res.data
for(let i in this.list){
for(let i in temp){
if(i === 0){
this.spanArr.push(1);
this.pos = 0;
this.spanArr1.push(1);
this.pos1 = 0;
}else{
if(this.list[i]?.target_type_detail?.name === this.list[i-1]?.target_type_detail?.name){
if(temp[i]?.target_type_detail?.name === temp[i-1]?.target_type_detail?.name){
this.spanArr[this.pos] += 1;
this.spanArr.push(0)
}else{
@ -172,7 +173,7 @@ export default {
this.pos = i;
}
if(this.list[i]?.target_type2_detail?.name === this.list[i-1]?.target_type2_detail?.name){
if(temp[i]?.target_type2_detail?.name === temp[i-1]?.target_type2_detail?.name){
this.spanArr1[this.pos1] += 1;
this.spanArr1.push(0)
}else{
@ -181,6 +182,7 @@ export default {
}
}
}
this.list = temp;
// let arr = [];
// let getProp = (data,name) => {
// if(!name || !data){

@ -32,15 +32,15 @@
<el-cascader
:options="types"
:props="{
checkStrictly: false,
checkStrictly: true,
label: 'name',
value: 'id',
}"
:value="select.type"
clearable
size="small"
style="width: 160px"
@change="(e) => (select.type = e[e.length - 1] || '')"
style="width: 200px"
@change="handleTypePick"
/>
</span>
@ -168,6 +168,7 @@
</i-button>
</Poptip>
<Button
v-if="scope.row.pid == 0"
class="slot-btns-item"
size="small"
type="primary"
@ -179,6 +180,7 @@
>绩效指标</Button
>
<Button
v-if="scope.row.pid == 0"
size="small"
type="primary"
class="slot-btns-item"
@ -247,6 +249,19 @@
>
</Poptip>
<Button
v-if="scope.row.pid == 0"
class="slot-btns-item"
size="small"
type="primary"
@click="
$refs['addPoint'].setPlanPid(scope.row.pid),
$refs['addPoint'].setPlanId(scope.row.id),
$refs['addPoint'].show()
"
>绩效指标</Button
>
<Button
v-if="scope.row.pid == 0"
class="slot-btns-item"
size="small"
type="primary"
@ -500,6 +515,7 @@
</div>
<div class="xy-table-item-content">
<el-cascader
:append-to-body="false"
:options="types"
:props="{
checkStrictly: false,
@ -556,6 +572,7 @@
</div>
<div class="xy-table-item-content">
<el-select
:popper-append-to-body="false"
placeholder="科室选择"
clearable
size="small"
@ -847,7 +864,8 @@ export default {
year: "",
type: "",
department: "",
is_auth: 0
is_auth: 0,
type_pid: "",
},
departments: [], //
@ -859,6 +877,22 @@ export default {
};
},
methods: {
handleTypePick(e) {
if (e.length === 1) {
this.select.type_pid = e[0] || ''
}
else if (e.length === 2) {
this.select.type_pid = e[1] || ''
}
else if (e.length === 3) {
this.select.type = e[e.length - 1] || ''
} else {
this.select.type = ''
this.select.type_pid = ''
}
console.log(this.select)
},
cascaderPick (e) {
this.form.type_pid = e[e.length - 2] || ''
this.form.type = e[e.length - 1] || ''
@ -1015,7 +1049,8 @@ export default {
plan_department_id: this.select.department,
is_tree: this.isTree ? 1 : "",
top_pid: !this.isTree ? 1 : "",
is_auth:this.select.is_auth
is_auth:this.select.is_auth,
type_pid: this.select.type_pid
}).then((res) => {
if (this.isTree) this.treeData = res.list;
else {
@ -1061,6 +1096,7 @@ export default {
plan_department_links: plan_department_links,
remark: this.form.remark,
pid: this.form.pid,
type_pid: this.form.type_pid,
}).then((res) => {
Message({
message: "操作成功",
@ -1113,6 +1149,7 @@ export default {
remark: this.editorForm.remark,
plan_department_id: this.editorForm.department,
plan_department_links: plan_department_links,
type_pid: this.editorForm.type_pid,
}).then((res) => {
this.isShowEditor = false;
Message({
@ -1146,6 +1183,7 @@ export default {
remark: res.remark,
plan_department_links: res.plan_department_links,
pid: res.pid,
type_pid: res.type_pid,
};
let ids = [];
res.plan_department_links.map((item) => {

@ -22,7 +22,7 @@
:style="{
margin: '0 0 10px 20px',
}"
@click="$refs['addPoint'].show()"
@click="$refs['addPoint'].setType('add'),$refs['addPoint'].show()"
>
目标新增</Button
>
@ -64,7 +64,7 @@
</span>
</el-dialog>
<addPoint ref="addPoint" :unit_ids="units" :symbol_ids="symbols" :target_types="types"></addPoint>
<addPoint ref="addPoint" :unit_ids="units" :symbol_ids="symbols" :target_types="types" @savePlanTarget="submitOne"></addPoint>
</div>
</template>
@ -413,6 +413,16 @@ export default {
}
},
submitOne ({ id, score}) {
save({
target_id: id,
plan_id: this.getPlanId(),
score
}).then(_ => {
this.getList();
})
},
submit() {
let promiseAll = [];
this.selections.forEach((target_id) => {

Loading…
Cancel
Save