xy 2 years ago
parent 6494086e5e
commit 10d27d4d0a

@ -20,6 +20,7 @@
"echarts": "^4.9.0",
"element-resize-detector": "^1.2.4",
"element-ui": "2.13.2",
"file-saver": "^2.0.5",
"html2canvas": "^1.4.1",
"js-cookie": "2.2.0",
"less": "^3.13.1",
@ -34,7 +35,8 @@
"vue-router": "3.0.6",
"vuex": "3.1.0",
"vuex-persistedstate": "^4.1.0",
"wangeditor": "^4.7.12"
"wangeditor": "^4.7.12",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.4",

@ -32,11 +32,12 @@ export function editorBudget(data){
})
}
export function detailBudget(params){
export function detailBudget(params,noloading=false){
return request({
method:'get',
url:"/api/admin/plan/show",
params
params,
noloading
})
}

@ -1,10 +1,11 @@
import request from '@/utils/request'
export function index(params) {
export function index(params,noloading=false) {
return request({
method: "get",
url: "/api/admin/plan_target/index",
params
params,
noloading
})
}

@ -24,7 +24,8 @@ const getDefaultState = () => {
min_allow_level: 2,
department: {},
roles: [],
oaToken: ''
oaToken: '',
myroles: [],
}
}
@ -37,6 +38,9 @@ const mutations = {
SET_TOKEN: (state, token) => {
state.token = token
},
SET_MYROLES: (state, roles) => {
state.myroles = roles
},
SET_LEVEL: (state, level=2) => {
state.min_allow_level = level
},
@ -131,6 +135,7 @@ const actions = {
if (!response) {
reject('身份验证失败请重新登录')
}
commit('SET_MYROLES', response.roles)
response["roles"] = ["admin"];
const {
id,

@ -1,6 +1,7 @@
<template>
<div>
<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-input :value="type === 1 ? form.middle_achievement : form.end_achievement"
@ -68,12 +69,14 @@ export default {
middle_achievement: "",
middle_effect: "",
middle_question: "",
middle_measure: ""
middle_measure: "",
year_middle_audit: ""
} : {
end_achievement: "",
end_effect: "",
end_question: "",
end_measure: ""
end_measure: "",
year_end_audit: ""
}
},
show() {
@ -93,6 +96,11 @@ export default {
submit() {
this.form.id = this.id
if (this.type === 1) {
this.form.year_middle_audit = (this.form.year_middle_audit && this.form.year_middle_audit < 0) ? Math.abs(this.form.year_middle_audit) : 1
} else {
this.form.year_end_audit = (this.form.year_end_audit && this.form.year_end_audit < 0) ? Math.abs(this.form.year_end_audit) : 1
}
editorBudget({
...this.form,
id: this.id
@ -102,6 +110,7 @@ export default {
message: "保存成功"
})
this.hidden();
this.$emit('refresh')
})
}
},

@ -0,0 +1,301 @@
<template>
<div>
<Modal
:width="74"
v-model="isShow"
title="绩效自评表">
<div class="detail-achievement-modal__body">
<table id="detail-achievement-table" ref="detail-achievement-table">
<tr>
<th style="text-align: center;font-weight: 600;line-height: 2;font-size: 17px;" colspan="8">江苏省省级项目预算绩效目标表</th>
</tr>
<tr>
<td style="text-align: center;font-weight: 600;" colspan="8">{{ detail.year }} 年度</td>
</tr>
<tr>
<th>单位名称</th>
<td colspan="7">江苏省苏州环境监测中心</td>
</tr>
<tr>
<th>主要职能</th>
<td colspan="7">{{ detail.content }}</td>
</tr>
<tr>
<th>机构设置及人员配置</th>
<td colspan="7"></td>
</tr>
<tr>
<th :rowspan="contractList.length+1">预算安排及支出情况</th>
<td colspan="2">
</td>
<td colspan="3">
全年预算数
</td>
<td colspan="2">
实际支出数
</td>
</tr>
<tr v-for="(item, index) in contractList">
<td colspan="2">
{{ item.name }}
</td>
<td colspan="3">
{{ item.plan_price }}
</td>
<td colspan="2">
{{ item.money}}
</td>
</tr>
<tr>
<th>一级指标</th>
<th>二级指标</th>
<th>三级指标</th>
<th>{{ type ? '半年' : '全年' }}指标值</th>
<th>分值</th>
<th style="max-width: 30%;">评价要点及评分规则</th>
<th>实际完成值</th>
<th>得分</th>
</tr>
<tr v-for="(item, index) in planTargetList" :key="item.id">
<td :rowspan="spanArr[index]" :style="{ 'display': spanArr[index] ? '' : 'none' }">{{ (item.target && item.target.target_type_detail) ? item.target.target_type_detail.name : '' }}</td>
<td :rowspan="spanArr1[index]" :style="{ 'display': spanArr1[index] ? '' : 'none' }">{{ (item.target && item.target.target_type2_detail) ? item.target.target_type2_detail.name : '' }}</td>
<td>{{ item.target ? item.target.name : '' }}</td>
<td>{{ targetValue(item) }}</td>
<td>{{ item.score }}</td>
<td style="max-width: 300px;">{{ item.target ? item.target.evaluation_way : '' }}</td>
<td>{{ actResultFormat(item) }}</td>
<td>{{ (item.plan_evaluates && item.plan_evaluates.find(j => j.plan_target_id === item.id)) ? item.plan_evaluates.find(j => j.plan_target_id === item.id).socre : '' }}</td>
</tr>
<tr>
<th colspan="4">合计</th>
<td>{{ targetTotal }}</td>
<th colspan="2"></th>
<td>{{ scoreTotal }}</td>
</tr>
<tr>
<th>绩效等级</th>
<td colspan="7">{{ type ? detail.middle_achievement : detail.end_achievement }}</td>
</tr>
<tr>
<th>主要成效</th>
<td colspan="7">{{ type ? detail.middle_effect : detail.end_effect }}</td>
</tr>
<tr>
<th>存在问题</th>
<td colspan="7">{{ type ? detail.middle_question : detail.end_question }}</td>
</tr>
<tr>
<th>整改措施</th>
<td colspan="7">{{ type ? detail.middle_measure : detail.end_measure }}</td>
</tr>
</table>
</div>
<template #footer>
<div>
<Button @click="hide"></Button>
<Button type="primary" icon="ios-download-outline" @click="exportExcel"></Button>
</div>
</template>
</Modal>
</div>
</template>
<script>
import { detailBudget } from "@/api/budget/budget";
import { index } from "@/api/budget/planTarget";
import { getContract } from "@/api/contract/contract";
import * as XLSX from "xlsx";
import { saveAs } from "file-saver";
export default {
props: {
//1
type: Number
},
data() {
return {
pos: 0,
pos1: 0,
spanArr: [],
spanArr1: [],
isShow: false,
planId: "",
detail: {},
planTargetList: [],
contractList: []
}
},
methods: {
show() {
this.isShow = true;
},
hide() {
this.isShow = false;
},
setPlanId(planId) {
this.planId = planId;
},
async getBudgetDetail() {
this.detail = await detailBudget({ id: this.planId },true)
console.log('detail',this.detail)
},
async getPlanTarget() {
const list = (await index({ plan_id: this.planId },true)).data
this.pos = this.pos1 = 0;
this.spanArr = [];
this.spanArr1 = [];
for(let i in list){
if(i === 0){
this.spanArr.push(1);
this.pos = 0;
this.spanArr1.push(1);
this.pos1 = 0;
}else{
if(list[i]?.target?.target_type_id === list[i-1]?.target?.target_type_id){
this.spanArr[this.pos] += 1;
this.spanArr.push(0)
}else{
this.spanArr.push(1);
this.pos = i;
}
if(list[i]?.target?.target_type2_id === list[i-1]?.target?.target_type2_id){
this.spanArr1[this.pos1] += 1;
this.spanArr1.push(0)
}else{
this.spanArr1.push(1);
this.pos1 = i;
}
}
}
this.planTargetList = list;
console.log('plantarget',this.planTargetList)
},
async getContract () {
const res = (await getContract({
plan_id: this.planId,
page: 1,
page_size: 1000,
}))?.list?.data
this.contractList = res;
console.log('contract', res)
},
exportExcel () {
let wb = XLSX.utils.table_to_book(this.$refs['detail-achievement-table'])
let wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'binary' });
// table
const table = this.$refs['detail-achievement-table'];
const rowCount = table.rows.length;
console.log(rowCount,123)
//
const ws = wb.Sheets[wb.SheetNames[0]];
if (!ws['!rows']) ws['!rows'] = [];
const rowHeight = 100; // 30
for (let i = 0; i < rowCount; i++) {
ws['!rows'][i] = { hpx: rowHeight };
}
ws['cols'] = Array.from({ length: 8 }, (v, k) => ({ wpx: 200}))
function s2ab(s) {
let buf = new ArrayBuffer(s.length);
let view = new Uint8Array(buf);
for (let i = 0; i < s.length; i++) {
view[i] = s.charCodeAt(i) & 0xff;
}
return buf;
}
saveAs(new Blob([s2ab(wbout)], { type: 'application/octet-stream' }), "绩效自评价表.xlsx")
}
},
computed: {
moneyFormat () {
return function(money) {
if (!money) {
return "0.00"
}
if (typeof money === "number") {
return (money / 10000).toFixed(2)
} else {
return (parseFloat(money) / 10000).toFixed(2)
}
}
},
targetValue () {
return function(item) {
if (item.target?.unit_detail?.value !== '无') {
return `${item.target?.symbol_detail?.value}${this.type ? item.target?.half_target : item.target?.year_target}${item.target?.unit_detail?.value}`
} else {
return this.type ? item.target?.half_target : item.target?.year_target
}
}
},
actResultFormat () {
return function(item) {
return item.plan_evaluates?.find(j => j.plan_target_id === item.id)?.result
}
},
targetTotal () {
return this.planTargetList.reduce((pre, cur) => {
return pre + (parseFloat(cur.score) || 0)
}, 0).toFixed(2)
},
scoreTotal () {
return this.planTargetList.reduce((pre, cur) => {
return pre + (parseFloat(cur?.plan_evaluates?.find(j => j.plan_target_id === cur.id)?.socre) || 0)
}, 0).toFixed(2)
}
},
watch: {
isShow (newVal, oldVal) {
if (newVal) {
this.getBudgetDetail()
this.getPlanTarget()
this.getContract()
}
}
}
}
</script>
<style scoped lang="scss">
.detail-achievement-modal__body {
padding: 10px;
max-height: 62vh;
overflow: scroll;
}
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
thead {
background-color: #f2f2f2;
}
th {
height: 40px;
}
</style>

@ -0,0 +1,109 @@
<template>
<div>
<Modal
v-model="isShow"
title="审核确认">
<div>
<p style="line-height: 3;font-weight: 600;">意见或建议</p>
<el-input v-model="reason" type="textarea" :autosize="{ minRows: 4 }"></el-input>
</div>
<template #footer>
<div>
<Button style="border: none;" @click="hide"></Button>
<Button type="error" @click="submit(true)"></Button>
<Button type="primary" @click="submit(false)"></Button>
</div>
</template>
</Modal>
</div>
</template>
<script>
import { editorBudget as save } from "@/api/budget/budget";
export default {
props: {
//1
type: Number
},
data() {
return {
reason: "",
isShow: false,
planId: '',
planLogs: [],
operateAuth: ""
}
},
methods: {
setOperateAuth (operateAuth) {
this.operateAuth = operateAuth;
},
setPlanLogs (logs) {
this.planLogs = logs
},
setPlanId (planId) {
this.planId = planId;
},
show () {
this.isShow = true;
},
hide () {
this.isShow = false;
},
submit (isBack = false) {
let status = 1;
let temp;
if (this.role.find(i => i === '系统管理员')) {
temp = this.operateAuth
} else {
temp = this.role.find(i => i === this.operateAuth)
}
switch (temp) {
case '部门负责人':
status = isBack ? -1 : 2;
break
case '中心分管主任':
status = isBack ? -2 : 3;
break
case '财务':
status = isBack ? -3 : 4;
break
}
let form = {
id: this.planId,
plan_logs: [{ reason: `${temp}${this.reason}` }],
}
if (this.type === 1) {
form.year_middle_audit = status;
} else {
form.year_end_audit = status;
}
save(form).then(res => {
this.hide();
this.$message({
message: '操作成功',
type:'success'
});
this.$emit('refresh');
})
}
},
computed: {
role () {
return this.$store.state.user.myroles?.map(i => i.name)
}
},
created() {
}
}
</script>
<style scoped lang="scss">
::v-deep .ivu-modal-body {
}
</style>

@ -1,17 +1,277 @@
<template>
<div>
<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>
<Button
style="margin-left: 10px"
type="primary"
@click="(select.page = 1), getBudgets()"
>查询</Button
>
</div>
</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="220"
>
<template v-slot:default="{ row }">
<div style="display: flex;align-items: flex-start;flex-wrap: wrap;">
<template v-if="auth('部门负责人') && row.year_end_audit === 1">
<Button type="primary" size="small" @click="$refs['examineConfirm'].setOperateAuth('部门负责人'),$refs['examineConfirm'].setPlanLogs(row.plan_logs),$refs['examineConfirm'].setPlanId(row.id),$refs['examineConfirm'].show()"></Button>
</template>
<template v-if="auth('中心分管主任') && row.year_end_audit === 2">
<Button type="primary" size="small" @click="$refs['examineConfirm'].setOperateAuth('中心分管主任'),$refs['examineConfirm'].setPlanLogs(row.plan_logs),$refs['examineConfirm'].setPlanId(row.id),$refs['examineConfirm'].show()"></Button>
</template>
<template v-if="auth('财务') && row.year_end_audit === 3">
<Button type="primary" size="small" @click="$refs['examineConfirm'].setOperateAuth('财务'),$refs['examineConfirm'].setPlanLogs(row.plan_logs),$refs['examineConfirm'].setPlanId(row.id),$refs['examineConfirm'].show()"></Button>
</template>
<Button type="primary" size="small" @click="$refs['detailAchievements'].setPlanId(row.id),$refs['detailAchievements'].show()"></Button>
</div>
</template>
</el-table-column>
</template>
</xy-table>
<div style="display: flex;justify-content: flex-end;">
<Page :total="total"
@on-change="e => {
select.page = e;
getBudgets()
}"
show-elevator
show-sizer
@on-page-size-change="e => {
select.page_size = e;
select.page = 1;
getBudgets()
}" />
</div>
<detailAchievements ref="detailAchievements" :type="0"></detailAchievements>
<examineConfirm ref="examineConfirm" :type="2" @refresh="getBudgets"></examineConfirm>
</div>
</template>
<script>
import {
addBudget,
getBudget,
delBudget,
editorBudget,
detailBudget,
} from "@/api/budget/budget";
import { mergeTableRow } from '@/utils/mergeTableRow'
import detailAchievements from '@/views/achievements/components/detailAchievements.vue'
import examineConfirm from '@/views/achievements/components/examineConfirm.vue'
export default {
components: { examineConfirm, detailAchievements },
data() {
return {}
return {
select: {
top_pid: 1,
page: 1,
page_size: 10,
name: "",
year: new Date().getFullYear().toString(),
type: "",
department: "",
is_auth: 0,
type_pid: "",
},
totalMoney: 0,
updateMoney: 0,
total: 0,
list: [],
table: [
{
label: "项目名称",
prop: "name",
width: 200,
align: "left",
sortable: false,
fixed: "left",
},
{
prop: 'type_detail.value',
label: "预算类型",
width: 115,
},
{
label: "所属年份",
prop: "year",
width: 105,
},
{
label: "年末绩效等级",
prop: "middle_achievement",
width: 200
},
{
label: "年末成效",
prop: "middle_effect",
width: 200
},
{
label: "年末问题",
prop: "middle_question",
width: 200
},
{
label: "年末整改措施",
prop: "middle_measure",
width: 200
},
{
label: "审核状态",
multiHd: [
{
label: "部门负责人",
prop: "year_end_audit",
customFn: row => {
const val = row.year_end_audit
if (val === -1) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 1 || val < -1) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
},
{
label: "分管领导",
prop: "year_end_audit",
customFn: row => {
const val = row.year_end_audit
if (val === -2) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 2 || val < -2) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
},
{
label: "财务",
prop: "year_end_audit",
customFn: row => {
const val = row.year_end_audit
if (val === -3) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 3) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
}
]
},
{
label: "自评意见",
width: 100,
prop: "plan_logs",
customFn: row => {
return (
<el-popover>
<div slot="default">
{
row.plan_logs.map((i,index) => (<p style="line-height: 2;">{++index}. {i.reason}{this.$moment(i.created_at).format('YYYY-MM-DD HH:mm')}</p>))
}
</div>
<el-link type="primary" slot="reference">查看</el-link>
</el-popover>
)
}
}
]
}
},
methods: {
//
getBudgets() {
getBudget(this.select).then((res) => {
if (this.isTree) this.treeData = res.list;
else {
for (var m of res.list.data) {
m.pid_info_name = m.pid_info?.name;
}
this.list = mergeTableRow({
data: res.list.data,
mergeColNames: ["pid_info_name"], //
firstMergeColNames: ["pid_info_name"], // firstMerge
firstMerge: "pid_info_name", //
});
this.total = res.list.total;
}
this.totalMoney = res.total_money;
this.updateMoney = res.update_money;
});
},
},
methods: {},
computed: {}
computed: {
auth () {
return function(roleName) {
return this.$store.state.user.min_allow_level === 0 || this.$store.state.user.myroles?.findIndex(i => i.name === roleName) !== -1
}
}
},
created() {
this.getBudgets()
}
}
</script>
<style scoped lang="scss">
Button + Button {
margin-left: 4px;
}
Button {
margin: 2px 0;
}
</style>

@ -92,8 +92,12 @@
自评表<i class="el-icon-arrow-down el-icon--right"></i>
</Button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="yearMiddle">年中</el-dropdown-item>
<el-dropdown-item command="yearEnd">年末</el-dropdown-item>
<el-dropdown-item command="yearMiddle">
<span :style="{'color': scope.row.year_middle_audit < 0 ? 'red' : '' }">年中</span>
</el-dropdown-item>
<el-dropdown-item command="yearEnd">
<span :style="{'color': scope.row.year_end_audit < 0 ? 'red' : '' }">年末</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <Button-->
@ -145,7 +149,7 @@
</div>
<addEvaluate ref="addEvaluate" @refresh="getList"></addEvaluate>
<addPlanEvaluate ref="addPlanEvaluate"></addPlanEvaluate>
<addSelfEvaluationForm ref="addSelfEvaluationForm"></addSelfEvaluationForm>
<addSelfEvaluationForm ref="addSelfEvaluationForm" @refresh="getList"></addSelfEvaluationForm>
</div>
</template>
@ -169,7 +173,7 @@ export default {
budgetTypes: [],
select: {
name: "",
year: new Date().getFullYear(),
year: new Date().getFullYear().toString(),
keyword: "",
page: 1,
page_size: 10,
@ -181,8 +185,18 @@ export default {
label: "项目名称",
prop: "name",
width: 200,
align: "left",
sortable: false,
fixed: "left",
customFn: row => {
return (
<p>
<span style="color: red;">{row.year_middle_audit < 0 ? '【年中自评驳回】' : '' }</span>
<span style="color: red;">{row.year_end_audit < 0 ? '【年末自评驳回】' : '' }</span>
<span>{row.name}</span>
</p>
)
}
},
{
label: "预算类型",
@ -233,6 +247,23 @@ export default {
align: "left",
sortable: false,
},
{
label: "自评意见",
width: 100,
prop: "plan_logs",
customFn: row => {
return (
<el-popover>
<div slot="default">
{
row.plan_logs.map((i,index) => (<p style="line-height: 2;">{++index}. {i.reason}{this.$moment(i.created_at).format('YYYY-MM-DD HH:mm')}</p>))
}
</div>
<el-link type="primary" slot="reference">查看</el-link>
</el-popover>
)
}
}
],
list: [],
};

@ -33,17 +33,13 @@
placeholder="请输入关键字"
style="width: 180px"
></Input>
<Button
style="margin-left: 10px"
type="primary"
@click="(select.page = 1), getBudgets()"
>查询</Button
>
</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>
@ -54,11 +50,21 @@
label="操作"
header-align="center"
fixed="right"
width="210"
width="220"
>
<template v-slot:default="scope">
<template v-slot:default="{ row }">
<div style="display: flex;align-items: flex-start;flex-wrap: wrap;">
<template v-if="auth('部门负责人') && row.year_middle_audit === 1">
<Button type="primary" size="small" @click="$refs['examineConfirm'].setOperateAuth('部门负责人'),$refs['examineConfirm'].setPlanLogs(row.plan_logs),$refs['examineConfirm'].setPlanId(row.id),$refs['examineConfirm'].show()"></Button>
</template>
<template v-if="auth('中心分管主任') && row.year_middle_audit === 2">
<Button type="primary" size="small" @click="$refs['examineConfirm'].setOperateAuth('中心分管主任'),$refs['examineConfirm'].setPlanLogs(row.plan_logs),$refs['examineConfirm'].setPlanId(row.id),$refs['examineConfirm'].show()"></Button>
</template>
<template v-if="auth('财务') && row.year_middle_audit === 3">
<Button type="primary" size="small" @click="$refs['examineConfirm'].setOperateAuth('财务'),$refs['examineConfirm'].setPlanLogs(row.plan_logs),$refs['examineConfirm'].setPlanId(row.id),$refs['examineConfirm'].show()"></Button>
</template>
<Button type="primary" size="small" @click="$refs['detailAchievements'].setPlanId(row.id),$refs['detailAchievements'].show()"></Button>
</div>
</template>
</el-table-column>
</template>
@ -68,40 +74,203 @@
<Page :total="total"
@on-change="e => {
select.page = e;
getList()
getBudgets()
}"
show-elevator
show-sizer
@on-page-size-change="e => {
select.page_size = e;
select.page = 1;
getList()
getBudgets()
}" />
</div>
<detailAchievements ref="detailAchievements" :type="1"></detailAchievements>
<examineConfirm ref="examineConfirm" :type="1" @refresh="getBudgets"></examineConfirm>
</div>
</template>
<script>
import {
getBudget,
} from "@/api/budget/budget";
import { mergeTableRow } from '@/utils/mergeTableRow'
import detailAchievements from '@/views/achievements/components/detailAchievements.vue'
import examineConfirm from '@/views/achievements/components/examineConfirm.vue'
export default {
components: {
detailAchievements,
examineConfirm
},
data() {
return {
select: {
top_pid: 1,
page: 1,
page_size: 10,
name: "",
year: new Date().getFullYear().toString(),
type: "",
department: "",
is_auth: 0,
type_pid: "",
},
totalMoney: 0,
updateMoney: 0,
total: 0,
list: [],
table: []
table: [
{
label: "项目名称",
prop: "name",
width: 200,
align: "left",
sortable: false,
fixed: "left",
},
{
prop: 'type_detail.value',
label: "预算类型",
width: 115,
},
{
label: "所属年份",
prop: "year",
width: 105,
},
{
label: "年中绩效等级",
prop: "middle_achievement",
width: 200
},
{
label: "年中成效",
prop: "middle_effect",
width: 200
},
{
label: "年中问题",
prop: "middle_question",
width: 200
},
{
label: "年中整改措施",
prop: "middle_measure",
width: 200
},
{
label: "审核状态",
multiHd: [
{
label: "部门负责人",
prop: "year_middle_audit",
customFn: row => {
const val = row.year_middle_audit
if (val === -1) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 1 || val < -1) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
},
{
label: "分管领导",
prop: "year_middle_audit",
customFn: row => {
const val = row.year_middle_audit
if (val === -2) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 2 || val < -2) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
},
{
label: "财务",
prop: "year_middle_audit",
customFn: row => {
const val = row.year_middle_audit
if (val === -3) {
return (<span style="color: red;">驳回</span>)
}
else if (val > 3) {
return (<span style="color: green;">通过</span>)
} else {
return '待审核'
}
},
width: 120
}
]
},
{
label: "自评意见",
width: 100,
prop: "plan_logs",
customFn: row => {
return (
<el-popover>
<div slot="default">
{
row.plan_logs.map((i,index) => (<p style="line-height: 2;">{++index}. {i.reason}{this.$moment(i.created_at).format('YYYY-MM-DD HH:mm')}</p>))
}
</div>
<el-link type="primary" slot="reference">查看</el-link>
</el-popover>
)
}
}
]
}
},
methods: {
getList () {
//
getBudgets() {
getBudget(this.select).then((res) => {
if (this.isTree) this.treeData = res.list;
else {
for (var m of res.list.data) {
m.pid_info_name = m.pid_info?.name;
}
this.list = mergeTableRow({
data: res.list.data,
mergeColNames: ["pid_info_name"], //
firstMergeColNames: ["pid_info_name"], // firstMerge
firstMerge: "pid_info_name", //
});
this.total = res.list.total;
}
this.totalMoney = res.total_money;
this.updateMoney = res.update_money;
});
},
},
computed: {
auth () {
return function(roleName) {
return this.$store.state.user.min_allow_level === 0 || this.$store.state.user.myroles?.findIndex(i => i.name === roleName) !== -1
}
}
},
computed: {}
created() {
this.getBudgets()
}
}
</script>
<style scoped lang="scss">
Button + Button {
margin-left: 4px;
}
Button {
margin: 2px 0;
}
</style>

@ -127,6 +127,40 @@ export default {
)
}
},
{
label: "评价方式",
width: 220,
prop: "evaluation_way",
customFn: row => {
return (
<div>
<el-input type="textarea" readonly={!!(row.target && row.target.is_fixed)} autosize={{ minRows: 1, maxRows: 3 }} vModel={row.evaluation_way}>
</el-input>
<el-button style="float: right;margin-top: 4px;"
size="small"
disabled={!!(row.target && row.target.is_fixed)}
type="primary"
icon="el-icon-edit"
on={{
click: _ => {
this.$confirm('确认保存评价方式?','提示',{
closeOnClickModal: false
}).then(_ => {
save(row).then(_ => {
this.$message({
type: 'success',
message: '保存成功'
})
this.getList()
})
})
}
}}>保存</el-button>
</div>
)
}
},
{
label: "指标名称",
prop: "target.name",
@ -413,11 +447,12 @@ export default {
}
},
submitOne ({ id, score}) {
submitOne ({ id, score, evaluation_way}) {
save({
target_id: id,
plan_id: this.getPlanId(),
score
score,
evaluation_way
}).then(_ => {
this.getList();
})
@ -431,7 +466,8 @@ export default {
save({
target_id,
plan_id: this.getPlanId(),
score: this.points.find(j => j.id === target_id)?.score
score: this.points.find(j => j.id === target_id)?.score,
evaluation_way: this.points.find(j => j.id === target_id)?.evaluation_way
})
);
});

@ -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"
@ -109,6 +127,8 @@ export default {
return {
budgetTypes: [],
select: {
name: "",
year: new Date().getFullYear().toString(),
keyword: "",
page: 1,
page_size: 10,

Loading…
Cancel
Save