xy 2 years ago
parent 8ed8d70981
commit 6494086e5e

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

@ -236,6 +236,7 @@
</template> </template>
<script> <script>
import { save as planTargetSave } from "@/api/budget/planTarget";
import { show, save } from "@/api/achievements/points"; import { show, save } from "@/api/achievements/points";
import { PopupManager } from "element-ui/src/utils/popup" import { PopupManager } from "element-ui/src/utils/popup"
export default { export default {
@ -390,6 +391,9 @@ export default {
}); });
} }
save(this.form).then((res) => { save(this.form).then((res) => {
if (/\/budgetList/g.test(this.$route.path) && this.type === 'add') {
this.$emit('savePlanTarget',res)
}
this.$message({ this.$message({
type: "success", type: "success",
message: 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> <slot>
<div class="selects"> <div class="selects">
<div> <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> <span style="padding: 0 6px; word-break: keep-all"> 关键字 </span>
<Input <Input
v-model="select.keyword" v-model="select.keyword"
@ -150,6 +168,8 @@ export default {
return { return {
budgetTypes: [], budgetTypes: [],
select: { select: {
name: "",
year: new Date().getFullYear(),
keyword: "", keyword: "",
page: 1, page: 1,
page_size: 10, 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() { async getList() {
this.list = [];
this.pos = this.pos1 = 0; this.pos = this.pos1 = 0;
this.spanArr = []; this.spanArr = [];
this.spanArr1 = []; this.spanArr1 = [];
const res = await index(this.select) const res = await index(this.select)
this.total = res.total 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){ if(i === 0){
this.spanArr.push(1); this.spanArr.push(1);
this.pos = 0; this.pos = 0;
this.spanArr1.push(1); this.spanArr1.push(1);
this.pos1 = 0; this.pos1 = 0;
}else{ }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[this.pos] += 1;
this.spanArr.push(0) this.spanArr.push(0)
}else{ }else{
@ -172,7 +173,7 @@ export default {
this.pos = i; 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[this.pos1] += 1;
this.spanArr1.push(0) this.spanArr1.push(0)
}else{ }else{
@ -181,6 +182,7 @@ export default {
} }
} }
} }
this.list = temp;
// let arr = []; // let arr = [];
// let getProp = (data,name) => { // let getProp = (data,name) => {
// if(!name || !data){ // if(!name || !data){

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

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

Loading…
Cancel
Save