This commit is contained in:
王创世 2025-03-22 16:19:55 +08:00
parent 7c479bb32e
commit 4ebc8f1102
12 changed files with 736 additions and 360 deletions

View File

@ -263,19 +263,19 @@ export const getQuarterListUpdate= function(date: any) {
//当前月度管理tab
//当前年末管理tab
export const getGroupYear= function(date: any) {
return Http.post('/api/backend/Year/getGroupEvaluation', date)
}
//当前月度管理List
//当前年末管理List
export const getYearUserList= function(date: any) {
return Http.post('/api/backend/Year/getUserList', date)
}
//当前月度用户详情
//当前年末用户详情
export const getYearListFind= function(date: any) {
return Http.post('/api/backend/Year/getMonthlyListFind', date)
}
//当前月度用户科室评价
//当前年末用户科室评价
export const getYearListUpdate= function(date: any) {
return Http.post('/api/backend/Year/getMonthlyListUpdate', date)
}

View File

@ -108,14 +108,7 @@ export default [
name: 'dayEvaluationExamine',
component: () => import('../../views/day_evaluation/examine.vue'),
meta: { title: '加减分审核', requireAuth: true, closable: true },
}
]
}, {
path: '/month_evaluation',
redirect: '/month_evaluation/index',
component: BasicLayout,
meta: { title: '月度考评' },
children: [
},
{
path: '/month_evaluation/index',
name: 'monthEvaluationIndex',
@ -126,14 +119,7 @@ export default [
name: 'monthEvaluationExamine',
component: () => import('../../views/month_evaluation/examine.vue'),
meta: { title: '月度考评管理', closable: true },
}
]
}, {
path: '/season_evaluation',
redirect: '/season_evaluation/index',
component: BasicLayout,
meta: { title: '季度考评' },
children: [
},
{
path: '/season_evaluation/index',
name: 'seasonEvaluationIndex',
@ -146,7 +132,45 @@ export default [
meta: { title: '季度考评管理', closable: true },
}
]
}, {
},
// {
// path: '/month_evaluation',
// redirect: '/month_evaluation/index',
// component: BasicLayout,
// meta: { title: '月度考评' },
// children: [
// {
// path: '/month_evaluation/index',
// name: 'monthEvaluationIndex',
// component: () => import('../../views/month_evaluation/index.vue'),
// meta: { title: '月度考评填报', requireAuth: true, closable: true },
// }, {
// path: '/month_evaluation/examine/:id*',
// name: 'monthEvaluationExamine',
// component: () => import('../../views/month_evaluation/examine.vue'),
// meta: { title: '月度考评管理', closable: true },
// }
// ]
// }, {
// path: '/season_evaluation',
// redirect: '/season_evaluation/index',
// component: BasicLayout,
// meta: { title: '季度考评' },
// children: [
// {
// path: '/season_evaluation/index',
// name: 'seasonEvaluationIndex',
// component: () => import('../../views/season_evaluation/index.vue'),
// meta: { title: '季度考评', requireAuth: true, closable: true },
// }, {
// path: '/season_evaluation/examine/:id*',
// name: 'seasonEvaluationExamine',
// component: () => import('../../views/season_evaluation/examine.vue'),
// meta: { title: '季度考评管理', closable: true },
// }
// ]
// },
{
path: '/outside_evaluation',
redirect: '/outside_evaluation/index',
component: BasicLayout,

View File

@ -113,7 +113,7 @@ const getHierarchicalTwoList = () => {
})
}
const getHierarchicalData = () => {
scoringGetHierarchicalData({}).then((res) => {
scoringGetHierarchicalData({page:1,size:1000}).then((res) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;

View File

@ -149,12 +149,11 @@ const addButton = ref([
console.log(addData);
if (addData.project_name == '') {
layer.msg('项目名称不能为空!', {icon: 2})
}
if (addData.project_code == '') {
layer.msg('项目代码不能为空!', {icon: 2})
return;
}
if (addData.base_score == '' || addData.base_score == 0) {
layer.msg('基础分值不能为空或为0', {icon: 2, time: 1000})
return;
}
if(addIsEdit.value==1){
var res = await homeGetHierarchicalDataCreate(addData);

View File

@ -281,7 +281,7 @@ const evaluationItems = ref<EvaluationItem[]>([])
const selectedItemTips = ref('')
const getHierarchicalData = () => {
scoringGetHierarchicalData({}).then((res) => {
scoringGetHierarchicalData({page:1,size:1000}).then((res) => {
console.log(res)
if (res.code == 1) {
evaluationItems.value = res.data;

View File

@ -29,7 +29,8 @@
<lay-col :md="6">
<lay-form-item label="考评对象" label-width="120">
<lay-select v-model="userId" :show-search="true" placeholder="请选择" :allowClear="true">
<lay-select-option v-for="item in dataSerSource" :value="item.id" :label="item.nickname"></lay-select-option>
<lay-select-option v-for="item in dataSerSource" :value="item.id"
:label="item.nickname"></lay-select-option>
</lay-select>
</lay-form-item>
</lay-col>
@ -69,16 +70,16 @@
<lay-tag v-if="row.scoringrecord_status == 1" type="primary">已自评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 2">未自评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 4" type="danger">医院已评</lay-tag>
<!-- <lay-tag v-if="row.scoringrecord_status == 4" type="danger">医院已评</lay-tag> -->
</template>
<template v-slot:nickname="{ row }">
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
</template>
<template v-slot:operator="{ row }">
<lay-space>
<span style="color: #00A394;cursor: pointer"
<!-- <span style="color: #00A394;cursor: pointer"
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 3"
@click="getInfo(row, 3)">医院评分</span>
@click="getInfo(row, 3)">医院评分</span> -->
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status == 1"
@click="getInfo(row, 2)">科室评分</span>
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
@ -94,26 +95,28 @@
<lay-container fluid="true" style="padding: 20px">
<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="true" :min="0" :max="data.base_score"
v-model="data.content_score" position="right"></lay-input-number>
<template v-slot:base_score="{ data }">
<div v-if="data.pid == 0">题目分{{ data.base_score }}</div>
<div v-if="data.pid != 0">{{ data.base_score }}</div>
</template>
<template v-slot:ksinput="{ 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.department_score" position="right"></lay-input-number>
<template v-slot:content_score="{ row, column, rowIndex }">
<div v-if="row.pid == 0">已评分{{ row.avg_score ? row.avg_score : 0 }}</div>
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
</template>
<template v-slot:yyinput="{ data, rowIndex }">
<template v-slot:department_score="{ row, rowIndex }">
<div v-if="row.pid == 0">已评分{{ row.department_score ? row.department_score : 0 }}</div>
<lay-input-number :disabled="addIsInfo==1" @change="inputKsChange(row)" v-if="row.pid != 0" :min="0" :max="row.base_score" v-model="row.department_score"
position="right"></lay-input-number>
</template>
<!-- <template v-slot:yyinput="{ data, rowIndex }">
<template v-if="userStore.userInfo.level == 3 || thisInfo.scoringrecord_status == 4">
<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 != 3" :min="0" :max="data.base_score"
v-model="data.hospital_score" position="right"></lay-input-number>
</template>
</template>
</template> -->
</lay-table>
</lay-container>
</lay-layer>
@ -151,7 +154,6 @@
<lay-tag v-if="row.scoringrecord_status == 1" type="primary">已自评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 2">未自评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 4" type="danger">医院已评</lay-tag>
</template>
<template v-slot:operator="{ row }">
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
@ -188,6 +190,54 @@ onMounted(() => {
}
getLeftList();
})
const inputChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.content_score);
});
//rowindex
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
}
//
const inputKsChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.department_score);
});
dataSource6.value[index].department_score = total;
}
//
const inputListKsShow = () => {
//dataSource6children
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.department_score);
});
dataSource6.value[index].department_score = total;
});
}
//
const inputListZpShow = () => {
//dataSource6children
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.content_score);
});
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
});
//rowindex
//dataSource6.value[index].avg_score = total;
//dataSource6.value[index].content_score = total;
}
const userShow = ref(false);
const userColumns = ref([
{ title: '月度', width: '80px', key: 'month', align: 'center' },
@ -195,7 +245,7 @@ const userColumns = ref([
{ title: '参评时间', width: '100px', key: 'createtime', align: 'center' },
{ title: '自评总分', width: '100px', key: 'self_score', align: 'center' },
{ title: '科室评分', width: '100px', key: 'department_score', align: 'center' },
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
// { title: '', width: '100px', key: 'hospital_score', align: 'center' },
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
])
@ -235,15 +285,15 @@ const getMonthlyInfo = (item, type) => {
item.time = item.month;
thisInfo.value = item;
getInfoMode(item);
if (item.scoringrecord_status == 4) {
columns6.push({
title: "医院评分",
width: "100px",
align: 'center',
customSlot: 'yyinput',
key: "yyinput"
});
}
// if (item.scoringrecord_status == 4) {
// columns6.push({
// title: "",
// width: "100px",
// align: 'center',
// customSlot: 'yyinput',
// key: "yyinput"
// });
// }
console.log(columns6);
}
@ -309,15 +359,15 @@ const getInfo = (row, type) => {
thisInfo.value = row;
getInfoMode(row);
if (row.scoringrecord_status == 4 && userStore.userInfo.level != 3) {
columns6.push({
title: "医院评分",
width: "100px",
align: 'center',
customSlot: 'yyinput',
key: "yyinput"
});
}
// if (row.scoringrecord_status == 4 && userStore.userInfo.level != 3) {
// columns6.push({
// title: "",
// width: "100px",
// align: 'center',
// customSlot: 'yyinput',
// key: "yyinput"
// });
// }
}
@ -330,6 +380,8 @@ const getInfoMode = (row) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
inputListZpShow();
inputListKsShow();
} else {
layer.msg(res.msg, { icon: 2 })
}
@ -393,10 +445,10 @@ const columns = ref([
{ title: '考评对象', width: '100px', key: 'nickname', customSlot: 'nickname', align: 'center' },
{ title: '工号', width: '100px', key: 'code', align: 'center' },
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
{ title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
// { title: '', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
{ title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center' },
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
{
title: '操作',
width: '180px',
@ -443,23 +495,27 @@ const columns6 = [
},
{
title: "分值",
width: "50px",
width: "80px",
align: 'center',
key: "base_score"
key: "base_score",
customSlot: 'base_score',
totalRow: true
},
{
title: "自评分",
width: "100px",
align: 'center',
customSlot: 'input',
key: "input"
customSlot: 'content_score',
key: "content_score",
totalRow: true
},
{
title: "科室评分",
width: "100px",
align: 'center',
customSlot: 'ksinput',
key: "ksinput"
customSlot: 'department_score',
key: "department_score",
totalRow: true
}
]

View File

@ -7,8 +7,7 @@
<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-date-picker type="year" v-model="searchAccount" placeholder="请选择" allow-clear></lay-date-picker>
</lay-form-item>
</lay-col>
<lay-col :md="4">
@ -29,13 +28,7 @@
</div>
<lay-tab v-model="current1" @change="openTab">
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
<lay-table
:columns="columns"
:dataSource="dataSource"
:even="true"
height="500px"
size="md"
>
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px" size="lg">
<template v-slot:id="{ data }">
{{ data.id }}
</template>
@ -49,9 +42,9 @@
{{ data.password }}
</template>
<template v-slot:operator="{ data }">
<span style="color: #00A394;cursor: pointer" v-if="data.if_month==1" @click="getMonthlyInfo(data)">详情</span>
<span style="color: #00A394;cursor: pointer" v-if="data.if_month==2"
@click="openZp(data)">开始自评</span>
<span style="color: #00A394;cursor: pointer" v-if="data.if_month == 1"
@click="getMonthlyInfo(data)">详情</span>
<span style="color: #00A394;cursor: pointer" v-if="data.if_month == 2" @click="openZp(data)">开始自评</span>
</template>
</lay-table>
</lay-tab-item>
@ -61,15 +54,19 @@
</lay-col>
</lay-row>
</lay-container>
<lay-layer v-model="visible11" title="月度自评详情" :type="4" :shade="true" :area="['950px','100%']" :btn="addIsInfo==1?addButton:''">
<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-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 v-slot:base_score="{ data }">
<div v-if="data.pid == 0">题目总分{{ data.base_score }}</div>
<div v-if="data.pid != 0">{{ data.base_score }}</div>
</template>
<template v-slot:content_score="{ row, column, rowIndex }">
<div v-if="row.pid == 0">已评总分{{ row.avg_score?row.avg_score:0 }}</div>
<lay-input-number @change="inputChange(row, rowIndex, column)" v-if="row.pid != 0" :disabled="addIsInfo == 2"
:min="0" :max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
</template>
</lay-table>
</lay-container>
@ -88,10 +85,8 @@ import dayjs from "dayjs";
const current1 = ref(1);
const tabList = ref([]);
const userStore = useUserStore()
const active = ref(-1);
const visible11 = ref(false);
const page = ref({total: 1, limit: 10, current: 1});
const dataSource = ref([]);
@ -102,7 +97,31 @@ onMounted(() => {
//getMonthlyContent();
getUserEvaluationData();
})
const openZp = (item) => {
const inputChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.content_score);
});
//rowindex
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
}
//
const inputListZpShow = () => {
//dataSource6children
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.content_score);
});
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
});
}
const openZp = () => {
visible11.value = true;
addIsInfo.value = 1
getMonthlyContent();
@ -132,6 +151,7 @@ const getMonthlyInfo = (item) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
inputListZpShow();
} else {
layer.msg(res.msg, { icon: 2 })
}
@ -179,21 +199,24 @@ const columns6 = [
title: "分值",
width: "100px",
align: 'center',
key: "base_score"
key: "base_score",
customSlot: 'base_score',
totalRow: true
},
{
title: "自评分",
width: "100px",
align: 'center',
customSlot: 'input',
key: "input"
customSlot: 'content_score',
key: "content_score",
totalRow: true
}
]
const columns = [
{
title: '月度',
width: '100px',
width: '120px',
align: 'center',
key: 'month'
},
@ -205,7 +228,7 @@ const columns = [
},
{
title: '参评时间',
width: '180px',
width: '250px',
align: 'center',
key: 'createtime'
},
@ -219,11 +242,11 @@ const columns = [
customSlot: 'department_score',
align: 'center',
},
{
title: '医院评分',
key: 'hospital_score',
align: 'center',
},
// {
// title: '',
// key: 'hospital_score',
// align: 'center',
// },
{
title: '操作',
width: '180px',

View File

@ -88,25 +88,19 @@
<lay-container fluid="true" style="padding: 20px">
<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="true" :min="0" :max="data.base_score"
v-model="data.content_score" position="right"></lay-input-number>
<template v-slot:base_score="{ data }">
<div v-if="data.pid == 0">题目分{{ data.base_score }}</div>
<div v-if="data.pid != 0">{{ data.base_score }}</div>
</template>
<template v-slot:ksinput="{ 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.department_score" position="right"></lay-input-number>
</template>
<template v-slot:yyinput="{ data, rowIndex }">
<template v-if="userStore.userInfo.level == 3 || thisInfo.scoringrecord_status == 4">
<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 != 3" :min="0" :max="data.base_score"
v-model="data.hospital_score" position="right"></lay-input-number>
<template v-slot:content_score="{ row, column, rowIndex }">
<div v-if="row.pid == 0">已评分{{ row.avg_score ? row.avg_score : 0 }}</div>
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
</template>
<template v-slot:department_score="{ row, rowIndex }">
<div v-if="row.pid == 0">已评分{{ row.department_score ? row.department_score : 0 }}</div>
<lay-input-number :disabled="addIsInfo==1" @change="inputKsChange(row)" v-if="row.pid != 0" :min="0" :max="row.base_score" v-model="row.department_score"
position="right"></lay-input-number>
</template>
</lay-table>
</lay-container>
@ -203,6 +197,51 @@ const openUserListShow = (row) => {
userShow.value = true;
getUserListInfo();
}
const inputChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.content_score);
});
//rowindex
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
}
//
const inputKsChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.department_score);
});
dataSource6.value[index].department_score = total;
}
//
const inputListKsShow = () => {
//dataSource6children
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.department_score);
});
dataSource6.value[index].department_score = total;
});
}
//
const inputListZpShow = () => {
//dataSource6children
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.content_score);
});
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
});
}
const getUserListInfo = () => {
getQuarterlyFindData({
'user_id': userInfo.value.id,
@ -298,15 +337,15 @@ const getInfo = (row, type) => {
console.log(row);
thisInfo.value = row;
getInfoMode(row);
if (row.scoringrecord_status == 4 && userStore.userInfo.level != 3) {
columns6.push({
title: "医院评分",
width: "100px",
align: 'center',
customSlot: 'yyinput',
key: "yyinput"
});
}
// if (row.scoringrecord_status == 4 && userStore.userInfo.level != 3) {
// columns6.push({
// title: "",
// width: "100px",
// align: 'center',
// customSlot: 'yyinput',
// key: "yyinput"
// });
// }
}
@ -319,6 +358,8 @@ const getInfoMode = (row) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
inputListZpShow();
inputListKsShow();
} else {
layer.msg(res.msg, { icon: 2 })
}
@ -441,35 +482,39 @@ const columns6 = [
},
{
title: "分值",
width: "100px",
width: "80px",
align: 'center',
key: "base_score"
key: "base_score",
customSlot: 'base_score',
totalRow: true
},
{
title: "自评分",
width: "100px",
align: 'center',
customSlot: 'input',
key: "input"
customSlot: 'content_score',
key: "content_score",
totalRow: true
},
{
title: "科室评分",
width: "100px",
align: 'center',
customSlot: 'ksinput',
key: "ksinput"
customSlot: 'department_score',
key: "department_score",
totalRow: true
}
]
//
if (userStore.userInfo.level == 3) {
columns6.push({
title: "医院评分",
width: "100px",
align: 'center',
customSlot: 'yyinput',
key: "yyinput"
});
}
// if (userStore.userInfo.level == 3) {
// columns6.push({
// title: "",
// width: "100px",
// align: 'center',
// customSlot: 'yyinput',
// key: "yyinput"
// });
// }
const dataSource6 = ref([])
</script>

View File

@ -7,8 +7,7 @@
<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-date-picker type="year" v-model="searchAccount" placeholder="请选择" allow-clear></lay-date-picker>
</lay-form-item>
</lay-col>
<lay-col :md="4">
@ -30,13 +29,7 @@
<lay-tab v-model="current1" @change="openTab">
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
</lay-tab>
<lay-table
:columns="columns"
:dataSource="dataSource"
:even="true"
height="500px"
size="md"
>
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px" size="lg">
<template v-slot:id="{ data }">
{{ data.id }}
</template>
@ -51,23 +44,26 @@
</template>
<template v-slot:operator="{ data }">
<span style="color: #00A394;cursor: pointer" v-if="data.if == 2" @click="getMonthlyInfo(data)">详情</span>
<span style="color: #00A394;cursor: pointer" v-if="data.if==1"
@click="insZp(data)">开始自评</span>
<span style="color: #00A394;cursor: pointer" v-if="data.if == 1" @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-layer v-model="visible11" title="季度自评" :type="4" :shade="true" :area="['950px', '100%']"
:btn="addIsInfo == 1 ? addButton : ''">
<lay-container fluid="true" style="padding: 20px">
<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 v-slot:base_score="{ data }">
<div v-if="data.pid == 0">题目总分{{ data.base_score }}</div>
<div v-if="data.pid != 0">{{ data.base_score }}</div>
</template>
<template v-slot:content_score="{ row, column, rowIndex }">
<div v-if="row.pid == 0">已评总分{{ row.avg_score ? row.avg_score : 0 }}</div>
<lay-input-number @change="inputChange(row, rowIndex, column)" v-if="row.pid != 0" :disabled="addIsInfo == 2"
:min="0" :max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
</template>
</lay-table>
</lay-container>
@ -75,11 +71,11 @@
</template>
<script setup lang="ts">
import {ref, onMounted} from 'vue'
import {layer} from '@layui/layer-vue'
import { ref, onMounted } from 'vue';
import { layer } from '@layui/layer-vue';
import {
QuarterList, QuarterContent, QuarterCreate, QuarterInfo, userEvaluationData, userQuarterData
} from '../../api/module/home'
QuarterList, QuarterContent, QuarterCreate, QuarterInfo, userQuarterData
} from '../../api/module/home';
import { useUserStore } from "@/store/user";
import dayjs from "dayjs";
const current1 = ref(1);
@ -101,6 +97,30 @@ onMounted(() => {
//getQuarterContent();
getUserEvaluationData();
})
const inputChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.content_score);
});
//rowindex
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
}
//
const inputListZpShow = () => {
//dataSource6children
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.content_score);
});
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
});
}
const openTab = (d) => {
console.log(d)
current1.value = d;
@ -132,6 +152,7 @@ const getMonthlyInfo = (item) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
inputListZpShow();
} else {
layer.msg(res.msg, { icon: 2 })
}
@ -168,21 +189,23 @@ const columns6 = [
title: "分值",
width: "100px",
align: 'center',
key: "base_score"
key: "base_score",
customSlot: 'base_score',
totalRow: true
},
{
title: "自评分",
width: "100px",
align: 'center',
customSlot: 'input',
key: "input"
customSlot: 'content_score',
key: "content_score",
totalRow: true
}
]
const columns = [
{
title: '季度',
width: '100px',
width: '120px',
align: 'center',
key: 'quarter'
},
@ -194,7 +217,7 @@ const columns = [
},
{
title: '参评时间',
width: '180px',
width: '250px',
align: 'center',
key: 'createtime'
},
@ -207,11 +230,12 @@ const columns = [
key: 'department_score',
customSlot: 'department_score',
align: 'center',
}, {
title: '医院评分',
key: 'hospital_score',
align: 'center',
},
// {
// title: '',
// key: 'hospital_score',
// align: 'center',
// },
{
title: '操作',
width: '180px',

View File

@ -48,8 +48,8 @@
{{ data.password }}
</template>
<template v-slot:level="{ data }">
<span v-if="data.level == 1" style="color: #FF9933">
审核
<span v-if="data.level == 1" style="color: #FF0033">
审核
</span>
<span v-if="data.level == 2" style="color: #00A394">
普通员工
@ -57,6 +57,12 @@
<span v-if="data.level == 3" style="color: #FF0033">
院级审核
</span>
<span v-if="data.level == 4" style="color: #FF0033">
支部审核
</span>
<span v-if="data.level == 5" style="color: #FF0033">
总党支审核
</span>
</template>
<template v-slot:operator="{ data }">
<lay-space>
@ -85,8 +91,10 @@
<lay-form-item label="审核权限" prop="level">
<lay-radio-group v-model="addData.level">
<lay-radio value="2">普通员工</lay-radio>
<lay-radio value="1">审核</lay-radio>
<lay-radio value="1">审核</lay-radio>
<lay-radio value="3">院级审核</lay-radio>
<lay-radio value="4">支部审核</lay-radio>
<lay-radio value="5">总党支审核</lay-radio>
</lay-radio-group>
</lay-form-item>
<lay-form-item label="角色权限" prop="desc">

View File

@ -50,10 +50,13 @@
<lay-table :page="page" height="600px" :columns="columns" :loading="loading" :data-source="dataSource"
v-model:selected-keys="selectedKeys" @change="change">
<template v-slot:scoringrecord_status="{ row }">
<!-- 1.已自评 2.未自评 3.科室已评 4.医院已评 5.支部已评 6.总党支已评 -->
<lay-tag v-if="row.scoringrecord_status == 1" type="primary">已自评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 2">未自评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 4" type="danger">医院已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
</template>
<template v-slot:nickname="{ row }">
<div style="color: #00A394;cursor: pointer" @click="openUserListShow(row)">{{ row.nickname }}</div>
@ -61,8 +64,11 @@
<template v-slot:operator="{ row }">
<lay-space>
<span style="color: #00A394;cursor: pointer"
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 3"
@click="getInfo(row, 3)">医院评分</span>
v-if="row.scoringrecord_status == 5 && userStore.userInfo.level == 5"
@click="getInfo(row, 4)">总党支评分</span>
<span style="color: #00A394;cursor: pointer"
v-if="row.scoringrecord_status == 3 && userStore.userInfo.level == 4"
@click="getInfo(row, 3)">支部评分</span>
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status == 1 && userStore.userInfo.level == 1"
@click="getInfo(row, 2)">科室评分</span>
<span style="color: #00A394;cursor: pointer" v-if="row.scoringrecord_status != 2"
@ -73,30 +79,38 @@
</lay-table>
</div>
</div>
<lay-layer v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['950px', '100%']"
<lay-layer @close="layerEnd" v-model="infoShow" title="自评详情" :type="4" :shade="true" :area="['950px', '100%']"
:btn="addIsInfo != 1 ? addButton : ''">
<lay-container fluid="true" style="padding: 20px">
<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="true" :min="0" :max="data.base_score"
v-model="data.content_score" position="right"></lay-input-number>
<template v-slot:base_score="{ data }">
<div v-if="data.pid == 0">题目分{{ data.base_score }}</div>
<div v-if="data.pid != 0">{{ data.base_score }}</div>
</template>
<template v-slot:ksinput="{ 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.department_score" position="right"></lay-input-number>
<!-- 自评评分 -->
<template v-slot:content_score="{ row}">
<div v-if="row.pid == 0">已评分{{ row.avg_score ? row.avg_score : 0 }}</div>
<lay-input-number @change="inputChange(row)" v-if="row.pid != 0" :disabled="true" :min="0"
:max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
</template>
<template v-slot:yyinput="{ data, rowIndex }">
<template v-if="userStore.userInfo.level == 3 || thisInfo.scoringrecord_status == 4">
<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 != 3" :min="0" :max="data.base_score"
v-model="data.hospital_score" position="right"></lay-input-number>
<!-- 科室评分 -->
<template v-slot:department_score="{ row }">
<div v-if="row.pid == 0">已评分{{ row.department_score ? row.department_score : 0 }}</div>
<lay-input-number :disabled="addIsInfo==1 || thisInfo.scoringrecord_status != 3" @change="inputKsChange(row)" v-if="row.pid != 0" :min="0" :max="row.base_score" v-model="row.department_score"
position="right"></lay-input-number>
</template>
<!-- 支部评分 -->
<template v-slot:party_branch_score="{ row }">
<div v-if="row.pid == 0">已评分{{ row.party_branch_score ? row.party_branch_score : 0 }}</div>
<lay-input-number :disabled="addIsInfo==1 || thisInfo.scoringrecord_status != 4" @change="inputZbChange(row)" v-if="row.pid != 0" :min="0" :max="row.base_score" v-model="row.party_branch_score"
position="right"></lay-input-number>
</template>
<!-- 党总支评分 -->
<template v-slot:overall_party_score="{ row }">
<div v-if="row.pid == 0">已评分{{ row.overall_party_score ? row.overall_party_score : 0 }}</div>
<lay-input-number :disabled="addIsInfo==1 || thisInfo.scoringrecord_status != 5" @change="inputZdzChange(row)" v-if="row.pid != 0" :min="0" :max="row.base_score" v-model="row.overall_party_score"
position="right"></lay-input-number>
</template>
</lay-table>
</lay-container>
@ -133,7 +147,9 @@
<lay-tag v-if="row.scoringrecord_status == 1" type="primary">已自评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 2">未自评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 3" type="warm">科室已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 4" type="danger">医院已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 4" type="normal">医院已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 5" color="blue">支部已评</lay-tag>
<lay-tag v-if="row.scoringrecord_status == 6" color="#000033">总党支已评 </lay-tag>
</template>
<template v-slot:operator="{ row }">
<span v-if="row.if == 2" style="color: #00A394;cursor: pointer"
@ -169,7 +185,92 @@ onMounted(() => {
}
getLeftList();
})
const inputChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.content_score);
});
//rowindex
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
}
//
const inputKsChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.department_score);
});
dataSource6.value[index].department_score = total;
}
//
const inputZbChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.party_branch_score);
});
dataSource6.value[index].party_branch_score = total;
}
//
const inputListZbShow = () => {
//dataSource6children
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.party_branch_score);
});
dataSource6.value[index].party_branch_score = total;
});
}
//
const inputZdzChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.overall_party_score);
});
dataSource6.value[index].overall_party_score = total;
}
//
const inputListZdzShow = () => {
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.overall_party_score);
});
dataSource6.value[index].overall_party_score = total;
});
}
//
const inputListKsShow = () => {
//dataSource6children
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.department_score);
});
dataSource6.value[index].department_score = total;
});
}
//
const inputListZpShow = () => {
//dataSource6children
dataSource6.value.forEach((item, index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.content_score);
});
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
});
}
const userShow = ref(false);
const userColumns = ref([
{ title: '年度', width: '80px', key: 'year', align: 'center' },
@ -279,16 +380,52 @@ const getInfo = (row, type) => {
console.log(row);
thisInfo.value = row;
getInfoMode(row);
if (row.scoringrecord_status == 4 && userStore.userInfo.level !=3 ) {
columns6.push({
title: "医院评分",
if (row.scoringrecord_status == 3 && userStore.userInfo.level ==4 ) {
columns6.value.push({
title: "支部评分",
width: "100px",
align: 'center',
customSlot: 'yyinput',
key: "yyinput"
customSlot: 'party_branch_score',
key: "party_branch_score",
totalRow: true
});
}
if (row.scoringrecord_status == 5 && userStore.userInfo.level ==5 ) {
columns6.value.push({
title: "支部评分",
width: "100px",
align: 'center',
customSlot: 'party_branch_score',
key: "party_branch_score",
totalRow: true
});
columns6.value.push({
title: "总党支评分",
width: "100px",
align: 'center',
customSlot: 'overall_party_score',
key: "overall_party_score",
totalRow: true
});
}
if (row.scoringrecord_status == 6 ) {
columns6.value.push({
title: "支部评分",
width: "100px",
align: 'center',
customSlot: 'party_branch_score',
key: "party_branch_score",
totalRow: true
});
columns6.value.push({
title: "总党支评分",
width: "100px",
align: 'center',
customSlot: 'overall_party_score',
key: "overall_party_score",
totalRow: true
});
}
}
const getInfoMode = (row) => {
getYearListFind({
@ -299,6 +436,10 @@ const getInfoMode = (row) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
inputListZpShow();
inputListKsShow();
inputListZbShow();
inputListZdzShow();
} else {
layer.msg(res.msg, { icon: 2 })
}
@ -370,9 +511,11 @@ const columns = ref([
{ title: '考评对象', width: '100px', key: 'nickname', customSlot: 'nickname', align: 'center' },
{ title: '工号', width: '100px', key: 'code', align: 'center' },
{ title: '部门', width: '120px', key: 'group_name', align: 'center' },
{ title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
{ title: '自评总分', width: '100px', key: 'user_scoringrecord', align: 'center' },
{ title: '科室评分', width: '100px', key: 'department_score_scoringrecord', align: 'center' },
{ title: '党支部评分', width: '100px', key: 'party_score_scoringrecord', align: 'center' },
{ title: '党总支评分', width: '100px', key: 'overall_score_scoringrecord', align: 'center' },
{ title: '医院评分', width: '100px', key: 'hospital_score_scoringrecord', align: 'center' },
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
{
title: '操作',
@ -389,6 +532,7 @@ const addButton = ref([
callback: async () => {
var json = JSON.stringify(dataSource6.value);
var res = await getYearListUpdate({
'type': thisInfo.value.scoringrecord_status,
'term': thisInfo.value.time,
'json': json,
'user_id': thisInfo.value.id,
@ -412,7 +556,7 @@ const addButton = ref([
}
}
])
const columns6 = [
const columns6 = ref([
{
title: "考评项目",
width: "300px",
@ -420,36 +564,74 @@ const columns6 = [
},
{
title: "分值",
width: "100px",
width: "80px",
align: 'center',
key: "base_score"
key: "base_score",
customSlot: 'base_score',
totalRow: true
},
{
title: "自评分",
width: "100px",
align: 'center',
customSlot: 'input',
key: "input"
customSlot: 'content_score',
key: "content_score",
totalRow: true
},
{
title: "科室评分",
width: "100px",
align: 'center',
customSlot: 'ksinput',
key: "ksinput"
customSlot: 'department_score',
key: "department_score",
totalRow: true
}
]
])
//
if (userStore.userInfo.level == 3) {
columns6.push({
title: "医院评分",
// if (userStore.userInfo.level == 4) {
// columns6.push({
// title: "",
// width: "100px",
// align: 'center',
// customSlot: 'yyinput',
// key: "yyinput"
// });
// }
const dataSource6 = ref([])
const layerEnd = () => {
console.log('layerEnd')
columns6.value = [
{
title: "考评项目",
width: "300px",
key: "project_name"
},
{
title: "分值",
width: "80px",
align: 'center',
key: "base_score",
customSlot: 'base_score',
totalRow: true
},
{
title: "自评分",
width: "100px",
align: 'center',
customSlot: 'yyinput',
key: "yyinput"
});
customSlot: 'content_score',
key: "content_score",
totalRow: true
},
{
title: "科室评分",
width: "100px",
align: 'center',
customSlot: 'department_score',
key: "department_score",
totalRow: true
}
];
}
const dataSource6 = ref([])
</script>
<style>

View File

@ -7,8 +7,7 @@
<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-date-picker type="year" v-model="searchAccount" placeholder="请选择" allow-clear></lay-date-picker>
</lay-form-item>
</lay-col>
<lay-col :md="4">
@ -29,13 +28,7 @@
</div>
<lay-tab v-model="current1" @change="openTab">
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id">
<lay-table
:columns="columns"
:dataSource="dataSource"
:even="true"
height="500px"
size="md"
>
<lay-table :columns="columns" :dataSource="dataSource" :even="true" height="500px" size="lg">
<template v-slot:id="{ data }">
{{ data.id }}
</template>
@ -49,7 +42,8 @@
{{ 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 == 1"
@click="getMonthlyInfo(data)">详情</span>
<span style="color: #00A394;cursor: pointer" v-if="data.if_period == 2"
@click="insZp(data)">开始自评</span>
</template>
@ -61,34 +55,19 @@
</lay-col>
</lay-row>
</lay-container>
<lay-layer v-model="visible11" title="月度自评详情" :type="4" :shade="true" :area="['950px','100%']" :btn="addIsInfo==1?addButton:''">
<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 v-slot:base_score="{ data }">
<div v-if="data.pid == 0">题目总分{{ data.base_score }}</div>
<div v-if="data.pid != 0">{{ data.base_score }}</div>
</template>
<template v-slot:content_score="{ row, column, rowIndex }">
<div v-if="row.pid == 0">已评总分{{ row.avg_score?row.avg_score:0 }}</div>
<lay-input-number @change="inputChange(row, rowIndex, column)" v-if="row.pid != 0" :disabled="addIsInfo == 2"
:min="0" :max="row.base_score" v-model="row.content_score" position="right"></lay-input-number>
</template>
</lay-table>
</lay-container>
@ -107,11 +86,8 @@ import dayjs from "dayjs";
const current1 = ref(1);
const tabList = ref([]);
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);
@ -123,6 +99,32 @@ onMounted(() => {
//getYearContent();
getUserEvaluationData();
})
const inputChange = (row) => {
//dataSource6children
let total = 0;
const index = dataSource6.value.findIndex(item => item.id === row.pid);
dataSource6.value[index].children.forEach(item => {
total += parseInt(item.content_score);
});
//rowindex
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
}
const inputListShow = () => {
//dataSource6children
dataSource6.value.forEach((item,index) => {
let total = 0;
item.children.forEach(item2 => {
total += parseInt(item2.content_score);
});
dataSource6.value[index].avg_score = total;
dataSource6.value[index].content_score = total;
});
//rowindex
//dataSource6.value[index].avg_score = total;
//dataSource6.value[index].content_score = total;
}
const getUserEvaluationData = () => {
userYearData({}).then((res) => {
console.log(res)
@ -155,6 +157,7 @@ const getMonthlyInfo = (item) => {
console.log(res)
if (res.code == 1) {
dataSource6.value = res.data;
inputListShow();
} else {
layer.msg(res.msg, { icon: 2 })
}
@ -191,17 +194,21 @@ const columns6 = [
title: "分值",
width: "100px",
align: 'center',
key: "base_score"
key: "base_score",
customSlot: 'base_score',
totalRow: true
},
{
title: "自评分",
width: "100px",
align: 'center',
customSlot: 'input',
key: "input"
customSlot: 'content_score',
key: "content_score",
totalRow: true
}
]
const columns = [
{
title: '年度',
@ -217,7 +224,7 @@ const columns = [
},
{
title: '参评时间',
width: '180px',
width: '250px',
align: 'center',
key: 'createtime'
},
@ -228,9 +235,17 @@ const columns = [
}, {
title: '科室评分',
key: 'department_score',
customSlot: 'department_score',
align: 'center',
}, {
title: '党支部评分',
key: 'department_score',
align: 'center',
}, {
title: '总党支评分',
key: 'department_score',
align: 'center',
}
, {
title: '医院评分',
key: 'hospital_score',
align: 'center',