This commit is contained in:
Air 2025-02-10 18:04:59 +08:00
parent 5c07d09a1d
commit f43a8643a2
6 changed files with 584 additions and 3 deletions

View File

@ -65,7 +65,7 @@ export const MonthlyList= function(date: any) {
export const MonthlyContent= function(date: any) {
return Http.post('/api/backend/Monthly/getMonthly', date)
}
//月度考评(考评题目
//月度考评(考评题目评价
export const MonthlyCreate= function(date: any) {
return Http.post('/api/backend/Monthly/create', date)
}
@ -74,6 +74,45 @@ export const MonthlyInfo= function(date: any) {
return Http.post('/api/backend/Monthly/getMonthlyFind', date)
}
//季度考评
export const QuarterList= function(date: any) {
return Http.post('/api/backend/Quarter/getQuarterlyData', date)
}
//季度考评
export const QuarterContent= function(date: any) {
return Http.post('/api/backend/Quarter/getMonthly', date)
}
//季度考评(考评题目评价)
export const QuarterCreate= function(date: any) {
return Http.post('/api/backend/Quarter/create', date)
}
//季度考评(考评题目详情)
export const QuarterInfo= function(date: any) {
return Http.post('/api/backend/Quarter/getQuarterFind', date)
}
//年度考评(列表)
export const YearList= function(date: any) {
return Http.post('/api/backend/Year/getAnnualData', date)
}
//年度考评(考评题目)
export const YearContent= function(date: any) {
return Http.post('/api/backend/Year/getYear', date)
}
//年度考评(考评题目评价)
export const YearCreate= function(date: any) {
return Http.post('/api/backend/Year/create', date)
}
//年度考评(考评题目详情)
export const YearInfo= function(date: any) {
return Http.post('/api/backend/Year/getYearFind', date)
}

View File

@ -118,7 +118,7 @@ export default [
{
path: '/season_evaluation/index',
name: 'seasonEvaluationIndex',
component: () => import('../../views/day_evaluation/index.vue'),
component: () => import('../../views/season_evaluation/index.vue'),
meta: {title: '季度考评', requireAuth: true, affix: true, closable: true},
},{
path: '/season_evaluation/examine',
@ -154,7 +154,7 @@ export default [
{
path: '/year_evaluation/index',
name: 'yearEvaluationIndex',
component: () => import('../../views/day_evaluation/index.vue'),
component: () => import('../../views/year_evaluation/index.vue'),
meta: {title: '年度考评', requireAuth: true, affix: true, closable: true},
},{
path: '/year_evaluation/examine',

View File

@ -84,6 +84,7 @@ const getHierarchicalData = () => {
const addShowMsd = (data,pid) => {
console.log(data);
addShow.value = true;
addData.id=0;
addData.scoring_type=data.scoring_type;
addData.pid=pid;
addIsEdit.value=1;
@ -93,6 +94,7 @@ const editShowMsd = (data) => {
addShow.value = true;
addData.id=data.id;
addData.project_name=data.project_name;
addData.pid=data.pid;
addData.project_code=data.project_code;
addData.base_score=data.base_score;
addData.scoring_type=data.scoring_type;

View File

@ -38,6 +38,9 @@
<template v-slot:id="{ data }">
{{ data.id }}
</template>
<template v-slot:department_score="{ data }">
{{ data.department_score==0?'-':data.department_score }}
</template>
<template v-slot:username="{ data }">
{{ data.username }}
</template>
@ -201,6 +204,7 @@ const columns = [
}, {
title: '科室评分',
key: 'department_score',
customSlot: 'department_score',
align: 'center',
},
{

View File

@ -0,0 +1,267 @@
<template>
<lay-container fluid="true" style="padding: 20px">
<lay-row :space="10">
<lay-col :md="24">
<lay-card>
<lay-form style="margin-top: 20px">
<lay-row>
<lay-col :md="5">
<lay-form-item label="季度:" label-width="50">
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择"
allow-clear></lay-date-picker>
</lay-form-item>
</lay-col>
<lay-col :md="4">
<lay-form-item label-width="0">
<lay-button type="primary" @click="toSearch">查询</lay-button>
<lay-button @click="toReset">重置</lay-button>
</lay-form-item>
</lay-col>
</lay-row>
</lay-form>
</lay-card>
</lay-col>
<lay-col :md="24">
<lay-card>
<div style="padding: 10px">
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">季度自评列表</span>
<lay-button type="primary" size="sm">导出Excel</lay-button>
</div>
<lay-table
:page="page"
:columns="columns"
:dataSource="dataSource"
:even="true"
height="600px"
size="md"
>
<template v-slot:id="{ data }">
{{ data.id }}
</template>
<template v-slot:department_score="{ data }">
{{ data.department_score==0?'-':data.department_score }}
</template>
<template v-slot:username="{ data }">
{{ data.username }}
</template>
<template v-slot:password="{ data }">
{{ data.password }}
</template>
<template v-slot:operator="{ data }">
<span style="color: #00A394;cursor: pointer" v-if="data.if_period==1" @click="getMonthlyInfo(data)">详情</span>
<span style="color: #00A394;cursor: pointer" v-if="data.if_period==2"
@click="insZp(data)">开始自评</span>
</template>
</lay-table>
</lay-card>
</lay-col>
</lay-row>
</lay-container>
<lay-layer v-model="visible11" title="季度自评详情" :type="4" :shade="true" :area="['950px','100%']" :btn="addIsInfo==1?addButton:''">
<lay-container fluid="true" style="padding: 20px">
<lay-card shadow="always">
<div style="height: 70px;width: 100%;">
<lay-step current-status="primary" style="margin: 0 auto" direction="horizontal" :active="active" space="100%"
:center="true">
<lay-step-item>
<template v-slot:default>
<div style="font-size: 18px;font-weight: bold;color: #009688">个人自评</div>
<!-- <div style="color: #999999">2025-01-01 14:35:33</div>-->
</template>
</lay-step-item>
<lay-step-item>
<template v-slot:default>
<div style="font-size: 18px;font-weight: bold;color: #009688">科室考评</div>
<div style="color: #999999"></div>
</template>
</lay-step-item>
</lay-step>
</div>
</lay-card>
<lay-table :default-expand-all="true" ref="tableRef6" children-column-name="children" :columns="columns6"
:data-source="dataSource6">
<template v-slot:input="{ data,rowIndex}">
<lay-input-number v-if="data.pid==0" :disabled="true" :min="0" :max="data.base_score"
v-model="data.base_score" position="right"></lay-input-number>
<lay-input-number v-if="data.pid!=0" :disabled="addIsInfo==2" :min="0" :max="data.base_score" v-model="data.content_score"
position="right"></lay-input-number>
</template>
</lay-table>
</lay-container>
</lay-layer>
</template>
<script setup lang="ts">
import {ref, onMounted} from 'vue'
import {layer} from '@layui/layer-vue'
import {
QuarterList, QuarterContent, QuarterCreate, QuarterInfo
} from '../../api/module/home'
import {useUserStore} from "@/store/user";
const userStore = useUserStore()
const active = ref(-1);
const visible11 = ref(false);
const page = ref({total: 100, limit: 10, current: 2});
const dataSource = ref([]);
const addIsInfo=ref(1);
const quarterName=ref('');
onMounted(() => {
getQuarterList();
getQuarterContent();
})
const insZp = (item) => {
visible11.value = true;
addIsInfo.value=1;
quarterName.value=item.quarter;
}
const getMonthlyInfo = (item) => {
visible11.value=true;
addIsInfo.value=2;
QuarterInfo({'user_id': userStore.userInfo.id, 'quarter': item.quarter}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
} else {
layer.msg(res.msg, {icon: 2})
}
})
}
const getQuarterList = () => {
QuarterList({'user_id': userStore.userInfo.id}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource.value = res.data;
} else {
layer.msg(res.msg, {icon: 2})
}
})
}
const dataSource6 = ref([]);
const getQuarterContent = () => {
QuarterContent({'type': 2}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
} else {
layer.msg(res.msg, {icon: 2})
}
})
}
const columns6 = [
{
title: "考评项目",
width: "300px",
key: "project_name"
},
{
title: "分值",
width: "100px",
align: 'center',
key: "base_score"
},
{
title: "自评分",
width: "100px",
align: 'center',
customSlot: 'input',
key: "input"
}
]
const columns = [
{
title: '季度',
width: '100px',
align: 'center',
key: 'quarter'
},
{
title: '考评对象',
width: '150px',
align: 'center',
key: 'user'
},
{
title: '参评时间',
width: '180px',
align: 'center',
key: 'createtime'
},
{
title: '加分',
key: 'remark',
align: 'center',
},
{
title: '扣分',
key: 'remark',
align: 'center',
},
{
title: '自评总分',
key: 'self_score',
align: 'center',
}, {
title: '科室评分',
key: 'department_score',
customSlot: 'department_score',
align: 'center',
},
{
title: '操作',
width: '180px',
customSlot: 'operator',
key: 'operator',
align: 'center',
fixed: 'right'
}
]
function toSearch() {
layer.load(2, {time: 3000})
}
const searchAccount = ref('')
const searchEmail = ref('')
function toReset() {
searchAccount.value = ''
searchEmail.value = ''
}
const addButton = ref([
{
text: "确认",
callback: async () => {
var json = JSON.stringify(dataSource6.value);
var res = await QuarterCreate({'term':quarterName.value,'json': json,'user_id': userStore.userInfo.id});
console.log(res)
if (res.code == 1) {
layer.msg('提交成功!', {icon: 1})
visible11.value = false;
getQuarterList();
getQuarterContent();
} else {
layer.msg(res.msg, {icon: 2})
}
}
},
{
text: "取消",
callback: () => {
visible11.value = false;
}
}
])
</script>
<style>
.layui-table-header .layui-table-cell {
background-color: #ECF8FA !important;
}
</style>

View File

@ -0,0 +1,269 @@
<template>
<lay-container fluid="true" style="padding: 20px">
<lay-row :space="10">
<lay-col :md="24">
<lay-card>
<lay-form style="margin-top: 20px">
<lay-row>
<lay-col :md="5">
<lay-form-item label="年度:" label-width="50">
<lay-date-picker type="year" v-model="searchAccount" placeholder="请选择"
allow-clear></lay-date-picker>
</lay-form-item>
</lay-col>
<lay-col :md="4">
<lay-form-item label-width="0">
<lay-button type="primary" @click="toSearch">查询</lay-button>
<lay-button @click="toReset">重置</lay-button>
</lay-form-item>
</lay-col>
</lay-row>
</lay-form>
</lay-card>
</lay-col>
<lay-col :md="24">
<lay-card>
<div style="padding: 10px">
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">年度自评列表</span>
<lay-button type="primary" size="sm">导出Excel</lay-button>
</div>
<lay-table
:page="page"
:columns="columns"
:dataSource="dataSource"
:even="true"
height="600px"
size="md"
>
<template v-slot:id="{ data }">
{{ data.id }}
</template>
<template v-slot:department_score="{ data }">
{{ data.department_score==0?'-':data.department_score }}
</template>
<template v-slot:username="{ data }">
{{ data.username }}
</template>
<template v-slot:password="{ data }">
{{ data.password }}
</template>
<template v-slot:operator="{ data }">
<span style="color: #00A394;cursor: pointer" v-if="data.if_period==1" @click="getMonthlyInfo(data)">详情</span>
<span style="color: #00A394;cursor: pointer" v-if="data.if_period==2"
@click="insZp(data)">开始自评</span>
</template>
</lay-table>
</lay-card>
</lay-col>
</lay-row>
</lay-container>
<lay-layer v-model="visible11" title="月度自评详情" :type="4" :shade="true" :area="['950px','100%']" :btn="addIsInfo==1?addButton:''">
<lay-container fluid="true" style="padding: 20px">
<lay-card shadow="always">
<div style="height: 70px;width: 100%;">
<lay-step current-status="primary" style="margin: 0 auto" direction="horizontal" :active="active" space="100%"
:center="true">
<lay-step-item>
<template v-slot:default>
<div style="font-size: 18px;font-weight: bold;color: #009688">个人自评</div>
<!-- <div style="color: #999999">2025-01-01 14:35:33</div>-->
</template>
</lay-step-item>
<lay-step-item>
<template v-slot:default>
<div style="font-size: 18px;font-weight: bold;color: #009688">科室考评</div>
<div style="color: #999999"></div>
</template>
</lay-step-item>
</lay-step>
</div>
</lay-card>
<lay-table :default-expand-all="true" ref="tableRef6" children-column-name="children" :columns="columns6"
:data-source="dataSource6">
<template v-slot:input="{ data,rowIndex}">
<lay-input-number v-if="data.pid==0" :disabled="true" :min="0" :max="data.base_score"
v-model="data.base_score" position="right"></lay-input-number>
<lay-input-number v-if="data.pid!=0" :disabled="addIsInfo==2" :min="0" :max="data.base_score" v-model="data.content_score"
position="right"></lay-input-number>
</template>
</lay-table>
</lay-container>
</lay-layer>
</template>
<script setup lang="ts">
import {ref, onMounted} from 'vue'
import {layer} from '@layui/layer-vue'
import {
YearList,
YearContent, YearCreate,YearInfo
} from '../../api/module/home'
import {useUserStore} from "@/store/user";
const userStore = useUserStore()
const active = ref(-1);
const visible11 = ref(false);
const page = ref({total: 100, limit: 10, current: 2});
const dataSource = ref([]);
const addIsInfo=ref(1);
const yearName=ref('');
onMounted(() => {
getYearList();
getYearContent();
})
const insZp = (item) => {
visible11.value = true;
addIsInfo.value=1;
yearName.value=item.year;
}
const getMonthlyInfo = (item) => {
visible11.value=true;
addIsInfo.value=2;
console.log(item)
YearInfo({'user_id': userStore.userInfo.id, 'year': item.year}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
} else {
layer.msg(res.msg, {icon: 2})
}
})
}
const getYearList = () => {
YearList({'user_id': userStore.userInfo.id}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource.value = res.data;
} else {
layer.msg(res.msg, {icon: 2})
}
})
}
const dataSource6 = ref([]);
const getYearContent = () => {
YearContent({'type': 1}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
} else {
layer.msg(res.msg, {icon: 2})
}
})
}
const columns6 = [
{
title: "考评项目",
width: "300px",
key: "project_name"
},
{
title: "分值",
width: "100px",
align: 'center',
key: "base_score"
},
{
title: "自评分",
width: "100px",
align: 'center',
customSlot: 'input',
key: "input"
}
]
const columns = [
{
title: '年度',
width: '100px',
align: 'center',
key: 'year'
},
{
title: '考评对象',
width: '150px',
align: 'center',
key: 'user'
},
{
title: '参评时间',
width: '180px',
align: 'center',
key: 'createtime'
},
{
title: '加分',
key: 'remark',
align: 'center',
},
{
title: '扣分',
key: 'remark',
align: 'center',
},
{
title: '自评总分',
key: 'self_score',
align: 'center',
}, {
title: '科室评分',
key: 'department_score',
customSlot: 'department_score',
align: 'center',
},
{
title: '操作',
width: '180px',
customSlot: 'operator',
key: 'operator',
align: 'center',
fixed: 'right'
}
]
function toSearch() {
layer.load(2, {time: 3000})
}
const searchAccount = ref('')
const searchEmail = ref('')
function toReset() {
searchAccount.value = ''
searchEmail.value = ''
}
const addButton = ref([
{
text: "确认",
callback: async () => {
var json = JSON.stringify(dataSource6.value);
var res = await YearCreate({'term': yearName.value,'json': json,'user_id': userStore.userInfo.id});
console.log(res)
if (res.code == 1) {
layer.msg('提交成功!', {icon: 1})
visible11.value = false;
getYearList();
getYearContent();
} else {
layer.msg(res.msg, {icon: 2})
}
}
},
{
text: "取消",
callback: () => {
visible11.value = false;
}
}
])
</script>
<style>
.layui-table-header .layui-table-cell {
background-color: #ECF8FA !important;
}
</style>