3333
This commit is contained in:
parent
e86e145535
commit
c8d7594858
2
auto-imports.d.ts
vendored
2
auto-imports.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
// Generated by 'unplugin-auto-import'
|
||||
export {}
|
||||
declare global {
|
||||
|
||||
const layer: typeof import('@layui/layer-vue')['layer']
|
||||
}
|
||||
|
@ -374,6 +374,24 @@ export function getPoliticsEdit(data: any) {
|
||||
return Http.post('/api/backend/Politics/update', data)
|
||||
}
|
||||
|
||||
// 个人档案详情
|
||||
export function getPersonalProfile(data: any) {
|
||||
return Http.post('/api/backend/user/personalProfile', data)
|
||||
}
|
||||
|
||||
// 左侧科室列表
|
||||
export function personalProfileList(data: any) {
|
||||
return Http.post('/api/backend/Personal_profile/index', data)
|
||||
}
|
||||
// 右侧人员列表
|
||||
export function personalProfileFind(data: any) {
|
||||
return Http.post('/api/backend/Personal_profile/find', data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -55,6 +55,11 @@ export default [
|
||||
name: 'systemNotice',
|
||||
component: () => import('../../views/system/notice.vue'),
|
||||
meta: { title: '通知公告', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/system/message',
|
||||
name: 'systemMessage',
|
||||
component: () => import('../../views/system/message.vue'),
|
||||
meta: { title: '站内信', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/system/permission',
|
||||
name: 'systemPermission',
|
||||
@ -204,6 +209,26 @@ export default [
|
||||
name: 'yearEvaluationExamine',
|
||||
component: () => import('../../views/year_evaluation/examine.vue'),
|
||||
meta: { title: '年度考评管理',closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation/department',
|
||||
name: 'yearEvaluationDepartment',
|
||||
component: () => import('../../views/year_evaluation/department.vue'),
|
||||
meta: { title: '年末科室考评管理',closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation/branch',
|
||||
name: 'yearEvaluationBranch',
|
||||
component: () => import('../../views/year_evaluation/branch.vue'),
|
||||
meta: { title: '年末支部考评管理',closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation/overall',
|
||||
name: 'yearEvaluationOverall',
|
||||
component: () => import('../../views/year_evaluation/overall.vue'),
|
||||
meta: { title: '年末总党支考评管理',closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation/hospital',
|
||||
name: 'yearEvaluationHospital',
|
||||
component: () => import('../../views/year_evaluation/hospital.vue'),
|
||||
meta: { title: '年末医院考评管理',closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
@ -213,10 +238,10 @@ export default [
|
||||
meta: { title: '医德医风档案' },
|
||||
children: [
|
||||
{
|
||||
path: '/file_bag/index',
|
||||
path: '/file_bag/index/:id*',
|
||||
name: 'fileBagIndex',
|
||||
component: () => import('../../views/file_bag/index.vue'),
|
||||
meta: { title: '我的档案', requireAuth: true, closable: true },
|
||||
meta: { title: '我的档案',closable: true },
|
||||
}, {
|
||||
path: '/file_bag/examine',
|
||||
name: 'fileBagExamine',
|
||||
@ -224,6 +249,29 @@ export default [
|
||||
meta: { title: '员工档案', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
},{
|
||||
path: '/year_evaluation_summary',
|
||||
redirect: '/year_evaluation_summary/index',
|
||||
component: BasicLayout,
|
||||
meta: { title: '年度考评汇总' },
|
||||
children: [
|
||||
{
|
||||
path: '/year_evaluation_summary/index',
|
||||
name: 'yearEvaluationSummaryIndex',
|
||||
component: () => import('../../views/year_evaluation_summary/index.vue'),
|
||||
meta: { title: '自动公示',closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation_summary/examine',
|
||||
name: 'yearEvaluationSummaryExamine',
|
||||
component: () => import('../../views/year_evaluation_summary/examine.vue'),
|
||||
meta: { title: '考评汇总', requireAuth: true, closable: true },
|
||||
}, {
|
||||
path: '/year_evaluation_summary/statistics',
|
||||
name: 'yearEvaluationSummaryStatistics',
|
||||
component: () => import('../../views/year_evaluation_summary/statistics.vue'),
|
||||
meta: { title: '统计分析', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/census',
|
||||
redirect: '/census/index',
|
||||
@ -295,6 +343,24 @@ export default [
|
||||
meta: { title: '医德征求意见管理', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/education',
|
||||
redirect: '/education/index',
|
||||
component: BasicLayout,
|
||||
meta: { title: '党风廉政教育' },
|
||||
children: [
|
||||
{
|
||||
path: '/education/index',
|
||||
name: 'educationIndex',
|
||||
component: () => import('../../views/education/index.vue'),
|
||||
meta: { title: '内容发布',closable: true },
|
||||
}, {
|
||||
path: '/education/question',
|
||||
name: 'educationQuestion',
|
||||
component: () => import('../../views/education/question.vue'),
|
||||
meta: { title: '问卷发布', requireAuth: true, closable: true },
|
||||
}
|
||||
]
|
||||
}, {
|
||||
path: '/error',
|
||||
component: BasicLayout,
|
||||
|
@ -129,7 +129,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import { getAdditionIndexManage, getAdditionIndexManageExamine, getDoctorName, userGroupData } from '@/api/module/home';
|
||||
import { getAdditionIndexManage, getAdditionIndexManageExamine, getDoctorName, getUserGroupNew } from '@/api/module/home';
|
||||
import { useUserStore } from '@/store/user';
|
||||
const userStore = useUserStore()
|
||||
onMounted(() => {
|
||||
@ -147,7 +147,7 @@ const getUserAllList = () => {
|
||||
const leftId = ref(0);
|
||||
const data = ref()
|
||||
const getLeftList = () => {
|
||||
userGroupData({}).then((res) => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
|
@ -80,7 +80,7 @@
|
||||
:label="item.project_name"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="分值" prop="score_value">
|
||||
<lay-form-item required label="分值" :tips="selectedItemTipsScore" prop="score_value">
|
||||
<lay-input-number :max="maxInput.single_score_max" :min="maxInput.single_score_min" v-model="formData.score_value" placeholder="请输入分值"></lay-input-number>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="发生时间" prop="fsdate">
|
||||
@ -223,14 +223,17 @@ const getFileDone = (res: UploadResponse) => {
|
||||
console.log("getFileDone", date)
|
||||
formData.fj_url = date.data.fullurl
|
||||
}
|
||||
|
||||
const selectedItemTipsScore = ref('');
|
||||
// 修改 handleItemChange 的实现
|
||||
const handleItemChange = (value: string | number | object) => {
|
||||
const selectedItem = evaluationItems.value.find(item => item.id === Number(value))
|
||||
|
||||
const selectedItem = evaluationItems.value.find(item => item.id == value)
|
||||
console.log(selectedItem);
|
||||
if (selectedItem) {
|
||||
maxInput.single_score_max = selectedItem.single_score_max
|
||||
maxInput.single_score_min = selectedItem.single_score_min
|
||||
selectedItemTips.value = selectedItem.scoring_criteria || ''
|
||||
maxInput.value.single_score_max = selectedItem.single_score_max
|
||||
maxInput.value.single_score_min = selectedItem.single_score_min
|
||||
selectedItemTips.value = selectedItem.scoring_criteria || '';
|
||||
selectedItemTipsScore.value = selectedItem.single_score_max + '分,最低' + selectedItem.single_score_min + '分';
|
||||
}
|
||||
}
|
||||
|
||||
@ -375,7 +378,7 @@ const change = ({ current, limit }: { current: number, limit: number }) => {
|
||||
}
|
||||
|
||||
|
||||
const maxInput = reactive({
|
||||
const maxInput = ref({
|
||||
single_score_max:10,
|
||||
single_score_min:0,
|
||||
});
|
||||
|
466
src/views/education/index.vue
Normal file
466
src/views/education/index.vue
Normal file
@ -0,0 +1,466 @@
|
||||
<template>
|
||||
<lay-container style="padding: 20px">
|
||||
<lay-card>
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">党风廉政教育</span>
|
||||
<lay-button type="primary" @click="openNew()" size="sm">新增教育</lay-button>
|
||||
</div>
|
||||
<lay-table :page="page" height="600px" size="lg" @change="changePage" :columns="columns" :data-source="dataSource">
|
||||
<!-- <template v-slot:content="{ data }">
|
||||
<div v-html="data.content"></div>
|
||||
</template> -->
|
||||
<template v-slot:status="{ data }">
|
||||
<span v-if="data.status == 1">已发布</span>
|
||||
<span v-if="data.status == 0">已隐藏</span>
|
||||
</template>
|
||||
<template v-slot:operator="{ data }">
|
||||
<lay-space size="lg">
|
||||
<span style="color: #00A394;cursor: pointer" @click="editShowMsd(data)">编辑</span>
|
||||
<lay-popconfirm trigger="click" content="确定要删除吗?" @confirm="delShowMsd(data)">
|
||||
<span style="color: #00A394;cursor: pointer">删除</span>
|
||||
</lay-popconfirm>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
<lay-layer v-model="addShow" :title="addIsEdit == 1 ? '新增' : '编辑'" :type="4" :shade="true"
|
||||
:area="['950px', '100%']" :btn="addButton">
|
||||
<lay-container fluid="true" style="padding: 20px">
|
||||
<lay-form :model="addData">
|
||||
<lay-form-item required label="内容标题" prop="title">
|
||||
<lay-input v-model="addData.title" placeholder="请输入教育标题"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="发布人" prop="author">
|
||||
<lay-input v-model="addData.author" placeholder="请输入发布人"></lay-input>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="教育内容" prop="content">
|
||||
<div class="editor">
|
||||
<!-- 这两个都是获取值的必要条件: v-model:content contentType="html" -->
|
||||
<quill-editor ref="editorRef" v-model:content="content" :options="options"
|
||||
contentType="html"></quill-editor>
|
||||
</div>
|
||||
</lay-form-item>
|
||||
<lay-form-item required label="状态" prop="status">
|
||||
<lay-select v-model="addData.status" placeholder="请选择">
|
||||
<lay-select-option :value="0" label="隐藏"></lay-select-option>
|
||||
<lay-select-option :value="1" label="显示"></lay-select-option>
|
||||
</lay-select>
|
||||
</lay-form-item>
|
||||
</lay-form>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
uploadImage
|
||||
} from '../../api/module/home'
|
||||
import { ref, onMounted, reactive, shallowRef, watch, nextTick, toRaw } from 'vue'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
import { baseURL } from '@/api/http'
|
||||
// Update editor configuration
|
||||
// 引入富文本编辑器与样式
|
||||
import { Quill, QuillEditor } from '@vueup/vue-quill'
|
||||
import '@vueup/vue-quill/dist/vue-quill.snow.css'
|
||||
|
||||
const content = ref('')
|
||||
const editorRef = ref<any>(null)
|
||||
// !!!如果方法报错,把imageHandler 方法放到options的上面
|
||||
// 处理富文本图片上传
|
||||
const imageHandler = () => {
|
||||
// 创建一个文件输入元素
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('accept', 'image/*');
|
||||
// 模拟点击,打开文件选择对话框
|
||||
input.click();
|
||||
|
||||
// 当用户选择文件后触发的事件
|
||||
input.onchange = async () => {
|
||||
// 获取用户选择的文件
|
||||
const file = input.files ? input.files[0] : null;
|
||||
if (file) {
|
||||
// 创建一个 FormData 对象,用于文件上传
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
try {
|
||||
/**
|
||||
* @todo 可以选中图片,然后把file文件给后端,后端给存到文件服务器,然后返回一个线上地址
|
||||
* 这里的abc替换成你的请求接口方法,也可以使用 axios 发送 POST 请求
|
||||
* */
|
||||
// todo
|
||||
// 使用 axios 发送 POST 请求,将文件上传到服务器,这里的abc替换成你的请求接口方法
|
||||
// 可以选中图片,然后把file文件给后端,后端给存到文件服务器,然后返回一个线上地址
|
||||
const res = await uploadImage(formData);
|
||||
|
||||
// 确保获取到 Quill 编辑器实例
|
||||
const quill = toRaw(editorRef.value).getQuill()
|
||||
if (quill) {
|
||||
// 获取当前光标位置
|
||||
const range = quill.getSelection(true);
|
||||
// 在当前光标位置插入上传的图片
|
||||
quill.insertEmbed(range.index, 'image', res.data.fullurl);
|
||||
}
|
||||
} catch (error) {
|
||||
alert('图片上传失败')
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
// 处理富文本图片上传
|
||||
const videoHandler = () => {
|
||||
// 创建一个文件输入元素
|
||||
const input = document.createElement('input');
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('accept', 'video/*');
|
||||
// 模拟点击,打开文件选择对话框
|
||||
input.click();
|
||||
|
||||
// 当用户选择文件后触发的事件
|
||||
input.onchange = async () => {
|
||||
// 获取用户选择的文件
|
||||
const file = input.files ? input.files[0] : null;
|
||||
if (file) {
|
||||
// 创建一个 FormData 对象,用于文件上传
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
|
||||
try {
|
||||
/**
|
||||
* @todo 可以选中图片,然后把file文件给后端,后端给存到文件服务器,然后返回一个线上地址
|
||||
* 这里的abc替换成你的请求接口方法,也可以使用 axios 发送 POST 请求
|
||||
* */
|
||||
// todo
|
||||
// 使用 axios 发送 POST 请求,将文件上传到服务器,这里的abc替换成你的请求接口方法
|
||||
// 可以选中图片,然后把file文件给后端,后端给存到文件服务器,然后返回一个线上地址
|
||||
const res = await uploadImage(formData);
|
||||
|
||||
// 确保获取到 Quill 编辑器实例
|
||||
const quill = toRaw(editorRef.value).getQuill()
|
||||
if (quill) {
|
||||
// 获取当前光标位置
|
||||
const range = quill.getSelection(true);
|
||||
// 在当前光标位置插入上传的图片
|
||||
quill.insertEmbed(range.index, 'video', res.data.fullurl);
|
||||
}
|
||||
} catch (error) {
|
||||
alert('图片上传失败')
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
// 富文本配置
|
||||
const options = ref({
|
||||
theme: 'bubble', // 使用snow主题
|
||||
modules: {
|
||||
// 富文本头部栏的功能配置
|
||||
toolbar: {
|
||||
container: [
|
||||
['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线
|
||||
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
|
||||
[{ align: [] }], // 对齐方式
|
||||
[{ size: ['small', false, 'large', 'huge'] }], // 字体大小
|
||||
[{ font: [] }], // 字体种类
|
||||
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||
[{ direction: 'ltl' }], // 文本方向
|
||||
[{ direction: 'rtl' }], // 文本方向
|
||||
[{ indent: '-1' }, { indent: '+1' }], // 缩进
|
||||
[{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表
|
||||
[{ script: 'sub' }, { script: 'super' }], // 上标/下标
|
||||
['blockquote', 'code-block'], // 引用 代码块
|
||||
['clean'], // 清除文本格式
|
||||
['link', 'image', 'video'], // 链接、图片、视频
|
||||
],
|
||||
handlers: {
|
||||
image: imageHandler, // 点击图片触发事件
|
||||
video: videoHandler, // 点击视频触发事件
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
// toolbar标题,划过富文本头部提示信息
|
||||
const titleConfig = [
|
||||
{ Choice: '.ql-insertMetric', title: '跳转配置' },
|
||||
{ Choice: '.ql-bold', title: '加粗' },
|
||||
{ Choice: '.ql-italic', title: '斜体' },
|
||||
{ Choice: '.ql-underline', title: '下划线' },
|
||||
{ Choice: '.ql-header', title: '段落格式' },
|
||||
{ Choice: '.ql-strike', title: '删除线' },
|
||||
{ Choice: '.ql-blockquote', title: '块引用' },
|
||||
{ Choice: '.ql-code', title: '插入代码' },
|
||||
{ Choice: '.ql-code-block', title: '插入代码段' },
|
||||
{ Choice: '.ql-font', title: '字体' },
|
||||
{ Choice: '.ql-size', title: '字体大小' },
|
||||
{ Choice: '.ql-list[value="ordered"]', title: '编号列表' },
|
||||
{ Choice: '.ql-list[value="bullet"]', title: '项目列表' },
|
||||
{ Choice: '.ql-direction', title: '文本方向' },
|
||||
{ Choice: '.ql-header[value="1"]', title: 'h1' },
|
||||
{ Choice: '.ql-header[value="2"]', title: 'h2' },
|
||||
{ Choice: '.ql-align', title: '对齐方式' },
|
||||
{ Choice: '.ql-color', title: '字体颜色' },
|
||||
{ Choice: '.ql-background', title: '背景颜色' },
|
||||
{ Choice: '.ql-image', title: '图像' },
|
||||
{ Choice: '.ql-video', title: '视频' },
|
||||
{ Choice: '.ql-link', title: '添加链接' },
|
||||
{ Choice: '.ql-formula', title: '插入公式' },
|
||||
{ Choice: '.ql-clean', title: '清除字体格式' },
|
||||
{ Choice: '.ql-script[value="sub"]', title: '下标' },
|
||||
{ Choice: '.ql-script[value="super"]', title: '上标' },
|
||||
{ Choice: '.ql-indent[value="-1"]', title: '向左缩进' },
|
||||
{ Choice: '.ql-indent[value="+1"]', title: '向右缩进' },
|
||||
{ Choice: '.ql-header .ql-picker-label', title: '标题大小' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="1"]', title: '标题一' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="2"]', title: '标题二' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="3"]', title: '标题三' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="4"]', title: '标题四' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="5"]', title: '标题五' },
|
||||
{ Choice: '.ql-header .ql-picker-item[data-value="6"]', title: '标题六' },
|
||||
{ Choice: '.ql-header .ql-picker-item:last-child', title: '标准' },
|
||||
{ Choice: '.ql-size .ql-picker-item[data-value="small"]', title: '小号' },
|
||||
{ Choice: '.ql-size .ql-picker-item[data-value="large"]', title: '大号' },
|
||||
{ Choice: '.ql-size .ql-picker-item[data-value="huge"]', title: '超大号' },
|
||||
{ Choice: '.ql-size .ql-picker-item:nth-child(2)', title: '标准' },
|
||||
{ Choice: '.ql-align .ql-picker-item:first-child', title: '居左对齐' },
|
||||
{ Choice: '.ql-align .ql-picker-item[data-value="center"]', title: '居中对齐' },
|
||||
{ Choice: '.ql-align .ql-picker-item[data-value="right"]', title: '居右对齐' },
|
||||
{ Choice: '.ql-align .ql-picker-item[data-value="justify"]', title: '两端对齐' }
|
||||
]
|
||||
// 给富文本框工具栏加上鼠标悬浮中文提示
|
||||
const initTitle = () => {
|
||||
for (let item of titleConfig) {
|
||||
// .editor 是富文本编辑器的类名
|
||||
let tip = document.querySelector('.editor ' + item.Choice);
|
||||
if (tip) {
|
||||
tip.setAttribute('title', item.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 自定义粘贴事件
|
||||
const customPaste = (e: ClipboardEvent) => {
|
||||
// Prevent default paste behavior
|
||||
e.preventDefault()
|
||||
|
||||
const clipboardData = e.clipboardData
|
||||
if (!clipboardData) return
|
||||
|
||||
const types = clipboardData.types
|
||||
if (types.includes('Files')) {
|
||||
Array.from(clipboardData.files).forEach(file => {
|
||||
// Handle file paste
|
||||
// Add your file handling logic here
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
interface EducationData {
|
||||
id?: number;
|
||||
title: string;
|
||||
author: string;
|
||||
content: string;
|
||||
status: number;
|
||||
}
|
||||
// 分页变化
|
||||
const changePage = (ppc) => {
|
||||
page.current = ppc.current;
|
||||
page.limit = ppc.limit;
|
||||
getNoticeList();
|
||||
}
|
||||
// 列表数据
|
||||
const dataSource = ref<EducationData[]>([]);
|
||||
const addShow = ref(false);
|
||||
// 1 add 2 edit
|
||||
const addIsEdit = ref(1);
|
||||
|
||||
// 修改分页参数定义
|
||||
const page = reactive({
|
||||
current: 1,
|
||||
limit: 10,
|
||||
total: 1
|
||||
});
|
||||
|
||||
const addData = reactive<EducationData>({
|
||||
title: '',
|
||||
author: '',
|
||||
content: '',
|
||||
status: 1
|
||||
});
|
||||
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
//getNoticeList()
|
||||
|
||||
// Wait for editor to be mounted and initialized
|
||||
// nextTick(() => {
|
||||
// // Add null check before accessing editor
|
||||
// if (editorRef.value && editorRef.value.getQuill()) {
|
||||
// // Initialize title tooltips
|
||||
// initTitle()
|
||||
|
||||
// // Add paste event listener
|
||||
// const editor = editorRef.value.getQuill()
|
||||
// editor.root.addEventListener('paste', customPaste, false)
|
||||
// }
|
||||
// })
|
||||
});
|
||||
|
||||
const openNew = () => {
|
||||
addData.id = undefined;
|
||||
addData.title = '';
|
||||
addData.author = '';
|
||||
addData.content = '';
|
||||
content.value = '';
|
||||
addData.status = 1;
|
||||
addIsEdit.value = 1;
|
||||
addShow.value = true;
|
||||
}
|
||||
|
||||
const getNoticeList = () => {
|
||||
noticeList({ page: page.current, size: page.limit }).then((res) => {
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.data;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const editShowMsd = (data: EducationData) => {
|
||||
addShow.value = true;
|
||||
addData.id = data.id;
|
||||
addData.title = data.title;
|
||||
addData.author = data.author;
|
||||
addData.content = data.content;
|
||||
content.value = data.content;
|
||||
addData.status = parseInt(data.status.toString());
|
||||
addIsEdit.value = 2;
|
||||
}
|
||||
|
||||
// Watch for changes in valueHtml and update addData.content
|
||||
watch(content, (newValue) => {
|
||||
addData.content = newValue;
|
||||
})
|
||||
|
||||
const delShowMsd = async (data: EducationData) => {
|
||||
const res = await noticeDelete({ id: data.id });
|
||||
if (res.code == 1) {
|
||||
layer.msg('删除成功!', { icon: 1 })
|
||||
getNoticeList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: "教育标题",
|
||||
width: "180px",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "发布人",
|
||||
width: "120px",
|
||||
key: "author"
|
||||
},
|
||||
{
|
||||
title: "教育内容",
|
||||
width: "280px",
|
||||
key: "content",
|
||||
ellipsisTooltip: true
|
||||
},
|
||||
{
|
||||
title: "发布时间",
|
||||
width: "180px",
|
||||
key: "createtime"
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
width: "100px",
|
||||
customSlot: 'status',
|
||||
key: "status"
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '120px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
align: 'center',
|
||||
fixed: 'right'
|
||||
}
|
||||
]
|
||||
const onCreated = (editor: any) => {
|
||||
editorRef.value = Object.seal(editor);
|
||||
}
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
callback: async () => {
|
||||
console.log(addData);
|
||||
return;
|
||||
if (addData.title == '') {
|
||||
layer.msg('教育标题不能为空!', { icon: 2 })
|
||||
return;
|
||||
}
|
||||
if (addData.author == '') {
|
||||
layer.msg('发布人不能为空!', { icon: 2 })
|
||||
return;
|
||||
}
|
||||
if (addData.content == '') {
|
||||
layer.msg('教育内容不能为空!', { icon: 2 })
|
||||
return;
|
||||
}
|
||||
|
||||
const res = addIsEdit.value == 1
|
||||
? await noticeAdd(addData)
|
||||
: await noticeEdit(addData);
|
||||
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
addShow.value = false;
|
||||
getNoticeList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
addShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
</script>
|
||||
<style scoped>
|
||||
:deep(.w-e-text-container) {
|
||||
min-height: 400px !important;
|
||||
}
|
||||
|
||||
:deep(.w-e-toolbar) {
|
||||
border: 1px solid #ddd !important;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
:deep(.w-e-text-container) {
|
||||
border: 1px solid #ddd !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
:deep(.ql-editor) {
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
}
|
||||
:deep(.layui-input-block){
|
||||
max-width: 85%;
|
||||
}
|
||||
</style>
|
||||
|
7
src/views/education/question.vue
Normal file
7
src/views/education/question.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>问卷发布</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
<lay-button size="xs" border="green" border-style="dashed" @click="getInfo(row)">
|
||||
员工档案
|
||||
</lay-button>
|
||||
<lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,1)">
|
||||
<!-- <lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,1)">
|
||||
月度考评
|
||||
</lay-button>
|
||||
<lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,2)">
|
||||
@ -73,109 +73,12 @@
|
||||
</lay-button>
|
||||
<lay-button size="xs" border="green" border-style="dashed" @click="getOpenAvg(row,3)">
|
||||
年度考评
|
||||
</lay-button>
|
||||
</lay-button> -->
|
||||
<!-- 移除了删除按钮 -->
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer v-model="addShow" :title="title" :area="['90%', '90%']" :shade="true">
|
||||
<div>
|
||||
<div class="file-detail-container">
|
||||
<div>
|
||||
<!-- 基本信息区域 -->
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">基本信息</h3>
|
||||
<div class="user-header">
|
||||
<!-- <div class="avatar-container">
|
||||
<img :src="userInfo.avatar" alt="用户头像" class="user-avatar">
|
||||
</div> -->
|
||||
<div class="basic-info">
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<span class="label">姓名:</span>
|
||||
<span class="value">{{ userInfo.nickname || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">工号:</span>
|
||||
<span class="value">{{ userInfo.code || '暂无'}}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">性别:</span>
|
||||
<span class="value">{{ userInfo.gender == 1 ? '男' : userInfo.gender == 2 ? '女' : '未知' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">手机号:</span>
|
||||
<span class="value">{{ userInfo.mobile || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">邮箱:</span>
|
||||
<span class="value">{{ userInfo.email || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">生日:</span>
|
||||
<span class="value">{{ userInfo.birthday || '暂无' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 工作信息区域 -->
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">工作信息</h3>
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<span class="label">科室:</span>
|
||||
<span class="value">{{ userInfo.user_group_name || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">党支部:</span>
|
||||
<span class="value">{{ userInfo.party_name || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">行政职务</span>
|
||||
<span class="value">{{ userInfo.administrative_position || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">岗位名称:</span>
|
||||
<span class="value">{{ userInfo.position || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">业务性质:</span>
|
||||
<span class="value">{{ userInfo.business_nature || '暂无' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 证件信息区域 -->
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">证件信息</h3>
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<span class="label">身份证号码:</span>
|
||||
<span class="value">{{ userInfo.member_code || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">资格证编码:</span>
|
||||
<span class="value">{{ userInfo.certificate_code || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">执业证编码:</span>
|
||||
<span class="value">{{ userInfo.license_code || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">执业证图片:</span>
|
||||
<span class="value">
|
||||
<a style="color: #00A394;" :href="userInfo.license_image" target="_blank">{{ userInfo.license_image || '暂无' }}</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@ -184,7 +87,9 @@ import { layer } from '@layui/layui-vue';
|
||||
import {
|
||||
authGroupData,
|
||||
userData, partyGroupData,
|
||||
userGroupData
|
||||
userGroupData,
|
||||
personalProfileFind,
|
||||
personalProfileList
|
||||
} from "@/api/module/home";
|
||||
import { useUserStore } from "@/store/user";
|
||||
import { useRouter } from 'vue-router';
|
||||
@ -194,30 +99,12 @@ const router = useRouter();
|
||||
const userStore = useUserStore()
|
||||
|
||||
onMounted(() => {
|
||||
//getUserList();
|
||||
getLeftList();
|
||||
getPartyList();
|
||||
getAuthList();
|
||||
//getUserDetail();
|
||||
})
|
||||
const getOpenAvg = (row, type) => {
|
||||
console.log(row, type);
|
||||
//1月度考评 2季度考评 3年度考评
|
||||
if(type==1){
|
||||
//跳转到月度考评/month_evaluation/examine,并且福袋rwo.id
|
||||
router.push({ path: '/month_evaluation/examine/' + row.id});
|
||||
}else if(type==2){
|
||||
//跳转到季度考评/season_evaluation/examine,并且福袋rwo.id
|
||||
router.push({ path: '/season_evaluation/examine/' + row.id});
|
||||
}else if(type==3){
|
||||
//跳转到年度考评/annual_evaluation/examine,并且福袋rwo.id
|
||||
router.push('/year_evaluation/examine/' + row.id)
|
||||
}
|
||||
}
|
||||
const dataSource = ref([])
|
||||
|
||||
const dataSource = ref([])
|
||||
const getUserList = () => {
|
||||
userData({ group_id: leftId.value, size: page.limit, page: page.current, ...searchQuery.value }).then((res) => {
|
||||
personalProfileFind({ group_id: leftId.value, size: page.limit, page: page.current, ...searchQuery.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.data;
|
||||
@ -233,26 +120,13 @@ const changePage = (ppc) => {
|
||||
page.limit = ppc.limit;
|
||||
getUserList();
|
||||
}
|
||||
const partyList = ref([])
|
||||
const getPartyList = () => {
|
||||
partyGroupData({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
partyList.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const leftId = ref(0);
|
||||
const getLeftList = () => {
|
||||
userGroupData({}).then((res) => {
|
||||
personalProfileList({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
if (userStore.userInfo.level == 1) {
|
||||
data.value.unshift({ id: 0, name: '全部', children: [] })
|
||||
}
|
||||
leftId.value = res.data[0].id;
|
||||
getUserList();
|
||||
} else {
|
||||
@ -260,20 +134,9 @@ const getLeftList = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const authList = ref([])
|
||||
const getAuthList = () => {
|
||||
authGroupData({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
authList.value = res.data;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//左侧
|
||||
const data = ref([])
|
||||
const selectedKey = ref('')
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
nickname: '',
|
||||
@ -318,8 +181,7 @@ const toSearch = () => {
|
||||
}
|
||||
const userInfo = ref();
|
||||
const getInfo = (row) => {
|
||||
addShow.value = true;
|
||||
userInfo.value = row;
|
||||
router.push({ path: '/file_bag/index/' + row.id});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
<template #title>
|
||||
<div class="card-title">
|
||||
<div>员工档案详情</div>
|
||||
<lay-button type="primary" size="sm" @click="goBack">返回</lay-button>
|
||||
</div>
|
||||
</template>
|
||||
<div class="user-detail">
|
||||
@ -19,19 +18,19 @@
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<span class="label">姓名:</span>
|
||||
<span class="value">{{ userInfo.nickname || '暂无' }}</span>
|
||||
<span class="value">{{ userInfo.nickname }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">工号:</span>
|
||||
<span class="value">{{ userInfo.work_number || userInfo.code || '暂无' }}</span>
|
||||
<span class="value">{{ userInfo.code }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">性别:</span>
|
||||
<span class="value">{{ genderText }}</span>
|
||||
<span class="value">{{ userInfo.gender == 1 ? '男' : '女' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">手机号:</span>
|
||||
<span class="value">{{ userInfo.mobile || '暂无' }}</span>
|
||||
<span class="value">{{ userInfo.mobile }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">邮箱:</span>
|
||||
@ -54,18 +53,10 @@
|
||||
<span class="label">科室:</span>
|
||||
<span class="value">{{ groupName || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">科室级别:</span>
|
||||
<span class="value">{{ userInfo.group_level || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">党支部:</span>
|
||||
<span class="value">{{ partyName || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">党支部级别:</span>
|
||||
<span class="value">{{ userInfo.party_level || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">岗位名称:</span>
|
||||
<span class="value">{{ userInfo.position || '暂无' }}</span>
|
||||
@ -78,10 +69,6 @@
|
||||
<span class="label">业务性质:</span>
|
||||
<span class="value">{{ userInfo.business_nature || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">角色:</span>
|
||||
<span class="value">{{ roleName || '暂无' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -101,32 +88,137 @@
|
||||
<span class="label">执业证编码:</span>
|
||||
<span class="value">{{ userInfo.license_code || '暂无' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 系统信息区域 -->
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">系统信息</h3>
|
||||
<div class="info-grid">
|
||||
<div class="info-item">
|
||||
<span class="label">账户名:</span>
|
||||
<span class="value">{{ userInfo.username || '暂无' }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">状态:</span>
|
||||
<span class="label">执业证图片:</span>
|
||||
<span class="value">
|
||||
<lay-tag :type="userInfo.status === 'normal' ? 'success' : 'danger'">
|
||||
{{ userInfo.status === 'normal' ? '正常' : '禁用' }}
|
||||
</lay-tag>
|
||||
<a v-if="userInfo.license_image" style="color:blue;" :href="userInfo.license_image" target="_blank">
|
||||
<img :src="userInfo.license_image" style="width: 100px;" />
|
||||
</a>
|
||||
<span v-else>暂无</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">创建时间:</span>
|
||||
<span class="value">{{ formatDate(userInfo.createtime) }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">更新时间:</span>
|
||||
<span class="value">{{ formatDate(userInfo.updatetime) }}</span>
|
||||
</div>
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">年度考评汇总</h3>
|
||||
<div>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="auto">
|
||||
<lay-date-picker type="year" v-model="yearmonthHz" 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="toSearchHz">
|
||||
查询
|
||||
</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</div>
|
||||
<div>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns"
|
||||
:data-source="userDataSource">
|
||||
<template v-slot:scoringrecord_status="{ row }">
|
||||
<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="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"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template> -->
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-section">
|
||||
<h3 class="section-title">加分/扣分情况</h3>
|
||||
<div>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="auto">
|
||||
<lay-date-picker type="year" v-model="yearmonthJia" 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="toSearchJJ">
|
||||
查询
|
||||
</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="100">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>加分</th>
|
||||
<th>考评项目</th>
|
||||
<th>原因</th>
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="item in jiaList">
|
||||
<tr v-if="item.assessment_type == 1">
|
||||
<td>{{ item.score_value }}</td>
|
||||
<td>{{ item.project_name }}</td>
|
||||
<td>{{ item.notes }}</td>
|
||||
<td>{{ item.createtime }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="margin-top: 20px;">
|
||||
<table class="layui-table">
|
||||
<colgroup>
|
||||
<col width="100">
|
||||
<col width="200">
|
||||
<col width="200">
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>加分</th>
|
||||
<th>考评项目</th>
|
||||
<th>原因</th>
|
||||
<th>时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="item in jiaList">
|
||||
<tr v-if="item.assessment_type == 2">
|
||||
<td>{{ item.score_value }}</td>
|
||||
<td>{{ item.project_name }}</td>
|
||||
<td>{{ item.notes }}</td>
|
||||
<td>{{ item.createtime }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -141,11 +233,14 @@
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const userId = ref(route.query.id || '1');
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import {
|
||||
getAnnualFindData, getPersonalProfile, getGroupYear
|
||||
} from "@/api/module/home";
|
||||
const userStore = useUserStore()
|
||||
const route = useRoute()
|
||||
// const userId = ref(route.query.id || '1');
|
||||
const userInfo = ref({});
|
||||
const loading = ref(true);
|
||||
const defaultAvatar = ref('/src/assets/default-avatar.png');
|
||||
@ -153,6 +248,8 @@ const groupName = ref('');
|
||||
const partyName = ref('');
|
||||
const roleName = ref('');
|
||||
|
||||
const yearmonthJia = ref(dayjs().year());
|
||||
|
||||
// 计算性别显示文本
|
||||
const genderText = computed(() => {
|
||||
if (userInfo.value.gender === 1) {
|
||||
@ -169,59 +266,90 @@ const formatDate = (dateString) => {
|
||||
if (!dateString) return '暂无';
|
||||
return dateString;
|
||||
};
|
||||
|
||||
const jiaList = ref([]);
|
||||
// 获取用户详情(使用模拟数据)
|
||||
const getUserDetail = () => {
|
||||
// 模拟用户数据
|
||||
userInfo.value = {
|
||||
id: 1,
|
||||
code: 'GH001',
|
||||
auth_group_id: 2,
|
||||
group_id: 3,
|
||||
party_id: 1,
|
||||
work_number: 'GH001',
|
||||
nickname: '张医生',
|
||||
email: 'zhangdoctor@example.com',
|
||||
mobile: '13800138000',
|
||||
avatar: 'https://picsum.photos/200',
|
||||
member_code: '110101199001011234',
|
||||
gender: 1,
|
||||
birthday: '1990-01-01',
|
||||
createtime: '2023-01-01 08:00:00',
|
||||
updatetime: '2023-06-15 14:30:00',
|
||||
token: 'abcdef123456',
|
||||
status: 'normal',
|
||||
username: 'zhangdoctor',
|
||||
password: '******',
|
||||
group_level: '三级',
|
||||
party_level: '二级',
|
||||
position: '主治医师',
|
||||
business_nature: '临床',
|
||||
certificate_code: 'ZG20150001',
|
||||
license_code: 'ZY20150001',
|
||||
administrative_position: '科室副主任'
|
||||
};
|
||||
|
||||
// 模拟科室、党支部和角色信息
|
||||
groupName.value = '内科';
|
||||
partyName.value = '医院第一党支部';
|
||||
roleName.value = '医生';
|
||||
|
||||
loading.value = false;
|
||||
getPersonalProfile({
|
||||
'user_id': user_id.value,
|
||||
'time': yearmonthJia.value
|
||||
}).then((res) => {
|
||||
if (res.code == 1) {
|
||||
console.log(res.data);
|
||||
userInfo.value = res.data.user;
|
||||
jiaList.value = res.data.date;
|
||||
getTabList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
router.go(-1);
|
||||
};
|
||||
|
||||
const toSearchJJ = () => {
|
||||
getUserDetail();
|
||||
}
|
||||
const toSearchHz = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
// 使用模拟数据,延迟一秒模拟加载效果
|
||||
onMounted(() => {
|
||||
//查询是否有query参数,没有则使用userStore.userInfo.id
|
||||
if (route.query.id) {
|
||||
user_id.value = route.query.id;
|
||||
} else {
|
||||
user_id.value = userStore.userInfo.id;
|
||||
}
|
||||
console.log(user_id.value)
|
||||
getUserDetail();
|
||||
//getUserListInfo();
|
||||
//getTabList();
|
||||
});
|
||||
const tabList = ref([]);
|
||||
const userDataSource = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const yearmonthHz = ref(dayjs().year());
|
||||
const user_id = ref(0);
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': user_id.value,
|
||||
'evaluation_id': tab_id.value,
|
||||
'time': yearmonthHz.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const getTabList = () => {
|
||||
getGroupYear({ 'group_id': userInfo.value.group_id }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
tab_id.value = res.data[0].id;
|
||||
getUserListInfo();
|
||||
//userTabId.value = res.data[0].id;
|
||||
// getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const userColumns = ref([
|
||||
{ title: '年度', width: '80px', key: 'year', align: 'center' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ 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: 'party_branch_score', align: 'center' },
|
||||
{ title: '总党支评分', width: '100px', key: 'overall_party_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
])
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style>
|
||||
.file-detail-container {
|
||||
padding: 20px;
|
||||
}
|
||||
@ -328,4 +456,54 @@ onMounted(() => {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.layui-table thead tr th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.layui-table tbody tr {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.layui-table td,
|
||||
.layui-table th {
|
||||
position: relative;
|
||||
padding: 9px 8px;
|
||||
min-height: 20px;
|
||||
height: 40px;
|
||||
line-height: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
thead {
|
||||
display: table-header-group;
|
||||
vertical-align: middle;
|
||||
unicode-bidi: isolate;
|
||||
border-color: inherit;
|
||||
}
|
||||
|
||||
.layui-table td {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #eee;
|
||||
}
|
||||
|
||||
.layui-table {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.layui-table thead tr {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
</style>
|
@ -85,6 +85,17 @@
|
||||
<lay-layer v-model="addShow" :title="title" :area="['750px', '100%']" :type="4" :shade="true" :btn="addButton">
|
||||
<div style="padding: 20px">
|
||||
<lay-form :model="model11" ref="layFormRef11" mode="inline">
|
||||
<lay-form-item label="证件照" prop="username">
|
||||
<lay-upload style="width:180px;" ref="uploadRefA" :number="1" field="file" :size="1000" :headers="{ token: userStore.token }"
|
||||
url="http://yfyd.hschool.com.cn/api/common/upload" @cutdone="getCutDone2" v-model="file2" :auto="true" acceptMime="images"
|
||||
:cut="false" :cutOptions="cutOptions" @done="getFileDone2">
|
||||
<template #preview>
|
||||
<div class="easy-wrap" v-if="model11.avatar">
|
||||
<img :src="model11.avatar" style="width: 100px;" />
|
||||
</div>
|
||||
</template>
|
||||
</lay-upload>
|
||||
</lay-form-item>
|
||||
<lay-form-item label="工号" prop="code" required>
|
||||
<lay-input v-model="model11.code" size="lg" placeholder="请输入工号"></lay-input>
|
||||
</lay-form-item>
|
||||
@ -198,7 +209,20 @@ const cutOptions = {
|
||||
aspectRatio: 1,
|
||||
}
|
||||
}
|
||||
const file2 = ref([]);
|
||||
const getCutDone2 = (res) => {
|
||||
console.log("getCutDone", res);
|
||||
cutUrl.value = res.msg;
|
||||
};
|
||||
const getFileDone2 = (res) => {
|
||||
var date = JSON.parse(res.data);
|
||||
console.log("getFileDone", date);
|
||||
model11.avatar = date.data.fullurl;
|
||||
//uploadRef.value.submit()
|
||||
};
|
||||
|
||||
const file1 = ref([]);
|
||||
|
||||
const getCutDone = (res) => {
|
||||
console.log("getCutDone", res);
|
||||
cutUrl.value = res.msg;
|
||||
|
87
src/views/system/message.vue
Normal file
87
src/views/system/message.vue
Normal file
@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<lay-container style="padding: 20px">
|
||||
<lay-card>
|
||||
<div style="padding: 10px">
|
||||
<span style="font-size: 18px;vertical-align: center;margin-right: 20px">站内信通知</span>
|
||||
</div>
|
||||
<lay-table size="lg" :columns="columns" :data-source="dataSource">
|
||||
<template v-slot:operator="{ data }">
|
||||
<lay-space>
|
||||
<span style="color: #00A394;cursor: pointer" @click="viewMessage(data)">查看</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-card>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { layer } from '@layui/layer-vue'
|
||||
|
||||
// 列表数据
|
||||
const dataSource = ref([
|
||||
{
|
||||
id: 1,
|
||||
title: '系统维护通知',
|
||||
content: '系统将于今晚22:00-23:00进行例行维护,请提前做好相关工作安排。',
|
||||
sender: '系统管理员',
|
||||
receiver: 1,
|
||||
status: 0,
|
||||
createTime: '2024-03-20 10:00:00'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '会议提醒',
|
||||
content: '请于明天下午14:00准时参加月度工作总结会议。',
|
||||
sender: '办公室',
|
||||
receiver: 1,
|
||||
status: 1,
|
||||
createTime: '2024-03-19 15:30:00'
|
||||
}
|
||||
])
|
||||
|
||||
// 表格列配置
|
||||
const columns = [
|
||||
{
|
||||
title: "标题",
|
||||
width: "200px",
|
||||
key: "title",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "发送人",
|
||||
width: "120px",
|
||||
key: "sender",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "发送时间",
|
||||
width: "180px",
|
||||
key: "createTime",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
width: "100px",
|
||||
customSlot: 'status',
|
||||
key: "status",
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '120px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
align: 'center',
|
||||
fixed: 'right'
|
||||
}
|
||||
]
|
||||
</script>
|
||||
<style scoped>
|
||||
.lay-table :deep(.layui-table-cell) {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
856
src/views/year_evaluation/branch.vue
Normal file
856
src/views/year_evaluation/branch.vue
Normal file
@ -0,0 +1,856 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</span>
|
||||
</template>
|
||||
</lay-tree>
|
||||
<div class="isFold" @click="isFold = !isFold">
|
||||
<lay-icon v-if="!isFold" class="layui-icon-left"></lay-icon>
|
||||
<lay-icon v-else class="layui-icon-right"></lay-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1; padding: 10px; over-flow: auto">
|
||||
<!-- table -->
|
||||
<lay-card>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<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>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<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="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>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 6 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 5)">医院评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
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"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer @close="layerEnd" v-model="infoShow" title="考评详情" :type="4" :shade="true" :area="['70%', '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: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 }">
|
||||
<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 }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.department_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 1 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :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 v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.party_branch_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 4 && row.pid != 0"
|
||||
@change="inputZbChange(row)" :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 v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.overall_party_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 5 && row.pid != 0"
|
||||
@change="inputZdzChange(row)" :min="0" :max="row.base_score" v-model="row.overall_party_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 医院评分 -->
|
||||
<template v-slot:hospital_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.hospital_score ? row.hospital_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.hospital_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 3 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.hospital_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<lay-layer v-model="userShow" title="年末考评列表" :shade="true" :area="['90%', '90%']">
|
||||
<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="searchAccountUser" 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" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="button" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<template v-slot:scoringrecord_status="{ row }">
|
||||
<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="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"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupYear,
|
||||
getYearUserList,
|
||||
getYearListFind, getYearListUpdate,
|
||||
getAnnualFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const columns6 = ref([
|
||||
{
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
])
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 inputYyChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListYyShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
});
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputZdzChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
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' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ 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: 'party_branch_score', align: 'center' },
|
||||
{ title: '总党支评分', width: '100px', key: 'overall_party_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
const userTabId = ref(0);
|
||||
const userInfo = ref({});
|
||||
const searchAccountUser = ref(dayjs().year());
|
||||
const openUserListShow = (row) => {
|
||||
userInfo.value = row;
|
||||
userShow.value = true;
|
||||
getUserListInfo();
|
||||
}
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': userInfo.value.id,
|
||||
'evaluation_id': userTabId.value,
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const openUserTab = (d) => {
|
||||
console.log(d)
|
||||
userTabId.value = d;
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time = item.year;
|
||||
getInfoMode(item);
|
||||
if (type == 1) {
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
const openTab = (d) => {
|
||||
console.log(d)
|
||||
tab_id.value = d;
|
||||
dataSource.value = [];
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
const page = reactive({ current: 1, limit: 10, total: 1 })
|
||||
const change = (d) => {
|
||||
console.log(d);
|
||||
page.current = d.current;
|
||||
page.limit = d.limit;
|
||||
getList();
|
||||
}
|
||||
const addIsInfo = ref(1);
|
||||
const infoShow = ref(false);
|
||||
const yearmonth = ref(dayjs().year());
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'user_id': userId.value,
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: page.current,
|
||||
size: page.limit
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 10000
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
if (type == 1) {
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getYearListFind({
|
||||
evaluation_schedule_id: tab_id.value,
|
||||
month: row.time,
|
||||
user_id: row.id
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
inputListZbShow();
|
||||
inputListZdzShow();
|
||||
inputListYyShow();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupYear({ 'group_id': group_id.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
tab_id.value = res.data[0].id;
|
||||
userTabId.value = res.data[0].id;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const group_id = ref(1);
|
||||
const getLeftList = () => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{ title: '选项', width: '55px', type: 'checkbox', align: 'center' },
|
||||
{ title: '序号', width: '60px', key: 'id', align: 'center' },
|
||||
{ title: '年度', width: '80px', key: 'time', align: 'center' },
|
||||
{ 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: '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: 'total_score', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
const dataSource = ref()
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
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,
|
||||
evaluation_schedule_id: tab_id.value
|
||||
});
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
thisInfo.value = {};
|
||||
infoShow.value = false;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
infoShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const 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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
const dataSource6 = ref([])
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.isFold {
|
||||
position: absolute;
|
||||
top: 36%;
|
||||
right: -10px;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
border-radius: 13px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
856
src/views/year_evaluation/department.vue
Normal file
856
src/views/year_evaluation/department.vue
Normal file
@ -0,0 +1,856 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</span>
|
||||
</template>
|
||||
</lay-tree>
|
||||
<div class="isFold" @click="isFold = !isFold">
|
||||
<lay-icon v-if="!isFold" class="layui-icon-left"></lay-icon>
|
||||
<lay-icon v-else class="layui-icon-right"></lay-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1; padding: 10px; overflow: auto">
|
||||
<!-- table -->
|
||||
<lay-card>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<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>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<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="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>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 6 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 5)">医院评分</span>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
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"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer @close="layerEnd" v-model="infoShow" title="考评详情" :type="4" :shade="true" :area="['70%', '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: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 }">
|
||||
<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 }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.department_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 1 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :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 v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.party_branch_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 4 && row.pid != 0"
|
||||
@change="inputZbChange(row)" :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 v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.overall_party_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 5 && row.pid != 0"
|
||||
@change="inputZdzChange(row)" :min="0" :max="row.base_score" v-model="row.overall_party_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 医院评分 -->
|
||||
<template v-slot:hospital_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.hospital_score ? row.hospital_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.hospital_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 3 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.hospital_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<lay-layer v-model="userShow" title="年末考评列表" :shade="true" :area="['90%', '90%']">
|
||||
<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="searchAccountUser" 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" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="button" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<template v-slot:scoringrecord_status="{ row }">
|
||||
<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="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"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupYear,
|
||||
getYearUserList,
|
||||
getYearListFind, getYearListUpdate,
|
||||
getAnnualFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const columns6 = ref([
|
||||
{
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
])
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 inputYyChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListYyShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
});
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputZdzChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
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' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ 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: 'party_branch_score', align: 'center' },
|
||||
{ title: '总党支评分', width: '100px', key: 'overall_party_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
const userTabId = ref(0);
|
||||
const userInfo = ref({});
|
||||
const searchAccountUser = ref(dayjs().year());
|
||||
const openUserListShow = (row) => {
|
||||
userInfo.value = row;
|
||||
userShow.value = true;
|
||||
getUserListInfo();
|
||||
}
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': userInfo.value.id,
|
||||
'evaluation_id': userTabId.value,
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const openUserTab = (d) => {
|
||||
console.log(d)
|
||||
userTabId.value = d;
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time = item.year;
|
||||
getInfoMode(item);
|
||||
if (type == 1) {
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
const openTab = (d) => {
|
||||
console.log(d)
|
||||
tab_id.value = d;
|
||||
dataSource.value = [];
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
const page = reactive({ current: 1, limit: 10, total: 1 })
|
||||
const change = (d) => {
|
||||
console.log(d);
|
||||
page.current = d.current;
|
||||
page.limit = d.limit;
|
||||
getList();
|
||||
}
|
||||
const addIsInfo = ref(1);
|
||||
const infoShow = ref(false);
|
||||
const yearmonth = ref(dayjs().year());
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'user_id': userId.value,
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: page.current,
|
||||
size: page.limit
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 10000
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
if (type == 1) {
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getYearListFind({
|
||||
evaluation_schedule_id: tab_id.value,
|
||||
month: row.time,
|
||||
user_id: row.id
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
inputListZbShow();
|
||||
inputListZdzShow();
|
||||
inputListYyShow();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupYear({ 'group_id': group_id.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
tab_id.value = res.data[0].id;
|
||||
userTabId.value = res.data[0].id;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const group_id = ref(1);
|
||||
const getLeftList = () => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{ title: '选项', width: '55px', type: 'checkbox', align: 'center' },
|
||||
{ title: '序号', width: '60px', key: 'id', align: 'center' },
|
||||
{ title: '年度', width: '80px', key: 'time', align: 'center' },
|
||||
{ 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: '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: 'total_score', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
const dataSource = ref()
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
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,
|
||||
evaluation_schedule_id: tab_id.value
|
||||
});
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
thisInfo.value = {};
|
||||
infoShow.value = false;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
infoShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const 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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
const dataSource6 = ref([])
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.isFold {
|
||||
position: absolute;
|
||||
top: 36%;
|
||||
right: -10px;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
border-radius: 13px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
854
src/views/year_evaluation/hospital.vue
Normal file
854
src/views/year_evaluation/hospital.vue
Normal file
@ -0,0 +1,854 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</span>
|
||||
</template>
|
||||
</lay-tree>
|
||||
<div class="isFold" @click="isFold = !isFold">
|
||||
<lay-icon v-if="!isFold" class="layui-icon-left"></lay-icon>
|
||||
<lay-icon v-else class="layui-icon-right"></lay-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1; padding: 10px; over-flow: auto">
|
||||
<!-- table -->
|
||||
<lay-card>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<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>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<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="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>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 6 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 5)">医院评分</span>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
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"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer @close="layerEnd" v-model="infoShow" title="考评详情" :type="4" :shade="true" :area="['70%', '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: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 }">
|
||||
<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 }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.department_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 1 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :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 v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.party_branch_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 4 && row.pid != 0"
|
||||
@change="inputZbChange(row)" :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 v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.overall_party_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 5 && row.pid != 0"
|
||||
@change="inputZdzChange(row)" :min="0" :max="row.base_score" v-model="row.overall_party_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 医院评分 -->
|
||||
<template v-slot:hospital_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.hospital_score ? row.hospital_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.hospital_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 3 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.hospital_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<lay-layer v-model="userShow" title="年末考评列表" :shade="true" :area="['90%', '90%']">
|
||||
<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="searchAccountUser" 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" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="button" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<template v-slot:scoringrecord_status="{ row }">
|
||||
<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="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"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupYear,
|
||||
getYearUserList,
|
||||
getYearListFind, getYearListUpdate,
|
||||
getAnnualFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const columns6 = ref([
|
||||
{
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
])
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 inputYyChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListYyShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
});
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputZdzChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
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' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ 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: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
const userTabId = ref(0);
|
||||
const userInfo = ref({});
|
||||
const searchAccountUser = ref(dayjs().year());
|
||||
const openUserListShow = (row) => {
|
||||
userInfo.value = row;
|
||||
userShow.value = true;
|
||||
getUserListInfo();
|
||||
}
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': userInfo.value.id,
|
||||
'evaluation_id': userTabId.value,
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const openUserTab = (d) => {
|
||||
console.log(d)
|
||||
userTabId.value = d;
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time = item.year;
|
||||
getInfoMode(item);
|
||||
if (type == 1) {
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
const openTab = (d) => {
|
||||
console.log(d)
|
||||
tab_id.value = d;
|
||||
dataSource.value = [];
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
const page = reactive({ current: 1, limit: 10, total: 1 })
|
||||
const change = (d) => {
|
||||
console.log(d);
|
||||
page.current = d.current;
|
||||
page.limit = d.limit;
|
||||
getList();
|
||||
}
|
||||
const addIsInfo = ref(1);
|
||||
const infoShow = ref(false);
|
||||
const yearmonth = ref(dayjs().year());
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'user_id': userId.value,
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: page.current,
|
||||
size: page.limit
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 10000
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
if (type == 1) {
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getYearListFind({
|
||||
evaluation_schedule_id: tab_id.value,
|
||||
month: row.time,
|
||||
user_id: row.id
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
inputListZbShow();
|
||||
inputListZdzShow();
|
||||
inputListYyShow();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupYear({ 'group_id': group_id.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
tab_id.value = res.data[0].id;
|
||||
userTabId.value = res.data[0].id;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const group_id = ref(1);
|
||||
const getLeftList = () => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{ title: '选项', width: '55px', type: 'checkbox', align: 'center' },
|
||||
{ title: '序号', width: '60px', key: 'id', align: 'center' },
|
||||
{ title: '年度', width: '80px', key: 'time', align: 'center' },
|
||||
{ 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: '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: 'total_score', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
const dataSource = ref()
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
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,
|
||||
evaluation_schedule_id: tab_id.value
|
||||
});
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
thisInfo.value = {};
|
||||
infoShow.value = false;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
infoShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const 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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
const dataSource6 = ref([])
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.isFold {
|
||||
position: absolute;
|
||||
top: 36%;
|
||||
right: -10px;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
border-radius: 13px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
856
src/views/year_evaluation/overall.vue
Normal file
856
src/views/year_evaluation/overall.vue
Normal file
@ -0,0 +1,856 @@
|
||||
<template>
|
||||
<lay-container fluid="true" class="organization-box">
|
||||
<div style="display: flex">
|
||||
<div :style="{ width: isFold ? `0px` : `230px` }" class="left-tree">
|
||||
<div v-if="!isFold">科室列表</div>
|
||||
<lay-tree v-show="!isFold" style="margin-top: 10px" :data="data" v-model:selectedKey="group_id"
|
||||
:showLine="false" @node-click="handleClick">
|
||||
<template #title="{ data }">
|
||||
<span :class="group_id == data.id ? 'isChecked' : ''">
|
||||
{{ data.name }}
|
||||
</span>
|
||||
</template>
|
||||
</lay-tree>
|
||||
<div class="isFold" @click="isFold = !isFold">
|
||||
<lay-icon v-if="!isFold" class="layui-icon-left"></lay-icon>
|
||||
<lay-icon v-else class="layui-icon-right"></lay-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1; padding: 10px; over-flow: auto">
|
||||
<!-- table -->
|
||||
<lay-card>
|
||||
<lay-form>
|
||||
<lay-row>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label="年度" label-width="80px">
|
||||
<lay-date-picker type="year" v-model="yearmonth" placeholder="年度" allow-clear></lay-date-picker>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="6">
|
||||
<lay-form-item label="考评对象" label-width="80px">
|
||||
<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>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
<lay-col :md="5">
|
||||
<lay-form-item label-width="20">
|
||||
<lay-button style="margin-left: 20px" type="primary" size="sm" @click="toSearch">
|
||||
查询
|
||||
</lay-button>
|
||||
<lay-button size="sm" @click="toReset"> 重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
<lay-tab v-model="tab_id" @change="openTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<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="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>
|
||||
</template>
|
||||
<template v-slot:operator="{ row }">
|
||||
<lay-space>
|
||||
<!-- <span style="color: #00A394;cursor: pointer"
|
||||
v-if="row.scoringrecord_status == 6 && userStore.userInfo.level == 3"
|
||||
@click="getInfo(row, 5)">医院评分</span> -->
|
||||
<span style="color: #00A394;cursor: pointer"
|
||||
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"
|
||||
@click="getInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.scoringrecord_status == 2">未自评</span>
|
||||
</lay-space>
|
||||
</template>
|
||||
</lay-table>
|
||||
</div>
|
||||
</div>
|
||||
<lay-layer @close="layerEnd" v-model="infoShow" title="考评详情" :type="4" :shade="true" :area="['70%', '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: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 }">
|
||||
<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 }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.department_score ? row.department_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.department_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 1 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :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 v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.party_branch_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 4 && row.pid != 0"
|
||||
@change="inputZbChange(row)" :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 v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.overall_party_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 5 && row.pid != 0"
|
||||
@change="inputZdzChange(row)" :min="0" :max="row.base_score" v-model="row.overall_party_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
<!-- 医院评分 -->
|
||||
<template v-slot:hospital_score="{ row }">
|
||||
<div v-if="row.pid == 0">已评分:{{ row.hospital_score ? row.hospital_score : 0 }}</div>
|
||||
<lay-input-number v-if="addIsInfo == 1 && row.pid != 0" :disabled="true" :min="0" :max="row.base_score"
|
||||
v-model="row.hospital_score" position="right"></lay-input-number>
|
||||
<lay-input-number v-if="addIsInfo != 1 && userStore.userInfo.level == 3 && row.pid != 0"
|
||||
@change="inputKsChange(row)" :min="0" :max="row.base_score" v-model="row.hospital_score"
|
||||
position="right"></lay-input-number>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
<lay-layer v-model="userShow" title="年末考评列表" :shade="true" :area="['90%', '90%']">
|
||||
<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="searchAccountUser" 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" size="sm" @click="toUserSearch">查询</lay-button>
|
||||
<lay-button size="sm" @click="toReset">重置</lay-button>
|
||||
</lay-form-item>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-form>
|
||||
</lay-card>
|
||||
</lay-col>
|
||||
<lay-col :md="24">
|
||||
<lay-tab v-model="userTabId" type="button" @change="openUserTab">
|
||||
<lay-tab-item v-for="item in tabList" :title="item.title" :id="item.id"></lay-tab-item>
|
||||
</lay-tab>
|
||||
<lay-table height="400px" :default-expand-all="true" :columns="userColumns" :data-source="userDataSource">
|
||||
<template v-slot:scoringrecord_status="{ row }">
|
||||
<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="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"
|
||||
@click="getMonthlyInfo(row, 1)">考评详情</span>
|
||||
<span style="color: #999999;cursor: not-allowed" v-if="row.if == 1">未自评</span>
|
||||
</template>
|
||||
</lay-table>
|
||||
</lay-col>
|
||||
</lay-row>
|
||||
</lay-container>
|
||||
</lay-layer>
|
||||
</lay-container>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { layer } from '@layui/layui-vue'
|
||||
import {
|
||||
getUserGroupNew,
|
||||
getGroupYear,
|
||||
getYearUserList,
|
||||
getYearListFind, getYearListUpdate,
|
||||
getAnnualFindData
|
||||
} from "@/api/module/home";
|
||||
import dayjs from "dayjs";
|
||||
import { useUserStore } from '@/store/user';
|
||||
import { useRoute } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const userStore = useUserStore()
|
||||
const userId = ref();
|
||||
onMounted(() => {
|
||||
if (route.params.id) {
|
||||
userId.value = parseInt(route.params.id);
|
||||
}
|
||||
getLeftList();
|
||||
})
|
||||
const columns6 = ref([
|
||||
{
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
])
|
||||
const inputChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.content_score);
|
||||
});
|
||||
//找到row的index
|
||||
dataSource6.value[index].avg_score = total;
|
||||
dataSource6.value[index].content_score = total;
|
||||
}
|
||||
//科室评分总分
|
||||
const inputKsChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 inputYyChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
let total = 0;
|
||||
const index = dataSource6.value.findIndex(item => item.id === row.pid);
|
||||
dataSource6.value[index].children.forEach(item => {
|
||||
total += parseInt(item.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputListYyShow = () => {
|
||||
dataSource6.value.forEach((item, index) => {
|
||||
let total = 0;
|
||||
item.children.forEach(item2 => {
|
||||
total += parseInt(item2.hospital_score);
|
||||
});
|
||||
dataSource6.value[index].hospital_score = total;
|
||||
});
|
||||
}
|
||||
//总党支评分总分
|
||||
const inputZdzChange = (row) => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
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 = () => {
|
||||
//计算出dataSource6里分数在children下所有的已评总分
|
||||
|
||||
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' },
|
||||
{ title: '考评对象', width: '100px', key: 'user', align: 'center' },
|
||||
{ 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: 'party_branch_score', align: 'center' },
|
||||
{ title: '总党支评分', width: '100px', key: 'overall_party_score', align: 'center' },
|
||||
{ title: '医院评分', width: '100px', key: 'hospital_score', align: 'center' },
|
||||
{ title: '总得分', width: '100px', key: 'total_score', align: 'center' },
|
||||
{ title: '状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{ title: '操作', width: '100px', key: 'operator', customSlot: 'operator', align: 'center' },
|
||||
])
|
||||
const userDataSource = ref([]);
|
||||
const userTabId = ref(0);
|
||||
const userInfo = ref({});
|
||||
const searchAccountUser = ref(dayjs().year());
|
||||
const openUserListShow = (row) => {
|
||||
userInfo.value = row;
|
||||
userShow.value = true;
|
||||
getUserListInfo();
|
||||
}
|
||||
const getUserListInfo = () => {
|
||||
getAnnualFindData({
|
||||
'user_id': userInfo.value.id,
|
||||
'evaluation_id': userTabId.value,
|
||||
'time': searchAccountUser.value
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
userDataSource.value = res.data;
|
||||
} else {
|
||||
userDataSource.value = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
const openUserTab = (d) => {
|
||||
console.log(d)
|
||||
userTabId.value = d;
|
||||
userDataSource.value = [];
|
||||
getUserListInfo();
|
||||
}
|
||||
const getMonthlyInfo = (item, type) => {
|
||||
addIsInfo.value = type;
|
||||
infoShow.value = true;
|
||||
console.log(item);
|
||||
item.time = item.year;
|
||||
getInfoMode(item);
|
||||
if (type == 1) {
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const toUserSearch = () => {
|
||||
getUserListInfo();
|
||||
}
|
||||
const openTab = (d) => {
|
||||
console.log(d)
|
||||
tab_id.value = d;
|
||||
dataSource.value = [];
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
const page = reactive({ current: 1, limit: 10, total: 1 })
|
||||
const change = (d) => {
|
||||
console.log(d);
|
||||
page.current = d.current;
|
||||
page.limit = d.limit;
|
||||
getList();
|
||||
}
|
||||
const addIsInfo = ref(1);
|
||||
const infoShow = ref(false);
|
||||
const yearmonth = ref(dayjs().year());
|
||||
const getList = () => {
|
||||
getYearUserList({
|
||||
'user_id': userId.value,
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: page.current,
|
||||
size: page.limit
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource.value = res.data.result;
|
||||
page.total = res.data.count;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const dataSerSource = ref([]);
|
||||
const getSerList = () => {
|
||||
getYearUserList({
|
||||
'group_id': group_id.value,
|
||||
'time': yearmonth.value,
|
||||
'evaluation_schedule_id': tab_id.value,
|
||||
page: 1,
|
||||
size: 10000
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSerSource.value = res.data.result;
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const thisInfo = ref();
|
||||
const getInfo = (row, type) => {
|
||||
infoShow.value = true;
|
||||
addIsInfo.value = type;
|
||||
thisInfo.value = row;
|
||||
getInfoMode(row);
|
||||
if (type == 1) {
|
||||
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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
}, {
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
//科室评分
|
||||
else if (type == 2) {
|
||||
columns6.value.push({
|
||||
title: "科室评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'department_score',
|
||||
key: "department_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 3) {
|
||||
columns6.value.push({
|
||||
title: "支部评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'party_branch_score',
|
||||
key: "party_branch_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else if (type == 4) {
|
||||
columns6.value.push({
|
||||
title: "总党支评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'overall_party_score',
|
||||
key: "overall_party_score",
|
||||
totalRow: true
|
||||
})
|
||||
} else {
|
||||
columns6.value.push({
|
||||
title: "医院评分",
|
||||
width: "100px",
|
||||
align: 'center',
|
||||
customSlot: 'hospital_score',
|
||||
key: "hospital_score",
|
||||
totalRow: true
|
||||
})
|
||||
}
|
||||
}
|
||||
const getInfoMode = (row) => {
|
||||
getYearListFind({
|
||||
evaluation_schedule_id: tab_id.value,
|
||||
month: row.time,
|
||||
user_id: row.id
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
dataSource6.value = res.data;
|
||||
inputListZpShow();
|
||||
inputListKsShow();
|
||||
inputListZbShow();
|
||||
inputListZdzShow();
|
||||
inputListYyShow();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const tabList = ref([]);
|
||||
const tab_id = ref(0);
|
||||
const getTabList = () => {
|
||||
getGroupYear({ 'group_id': group_id.value }).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
tabList.value = res.data;
|
||||
tab_id.value = res.data[0].id;
|
||||
userTabId.value = res.data[0].id;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const group_id = ref(1);
|
||||
const getLeftList = () => {
|
||||
getUserGroupNew({}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
data.value = res.data;
|
||||
group_id.value = res.data[0].id;
|
||||
getTabList();
|
||||
getSerList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
})
|
||||
}
|
||||
const data = ref([])
|
||||
const isFold = ref(false)
|
||||
const searchQuery = ref({
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
})
|
||||
|
||||
function toReset() {
|
||||
searchQuery.value = {
|
||||
year: '',
|
||||
evaluateTarget: '',
|
||||
status: ''
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(node: any) {
|
||||
// selectedNode.value = JSON.parse(JSON.stringify(node))
|
||||
page.current = 1;
|
||||
getList();
|
||||
// change(page)
|
||||
}
|
||||
|
||||
function toSearch() {
|
||||
page.current = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const selectedKeys = ref()
|
||||
const columns = ref([
|
||||
{ title: '选项', width: '55px', type: 'checkbox', align: 'center' },
|
||||
{ title: '序号', width: '60px', key: 'id', align: 'center' },
|
||||
{ title: '年度', width: '80px', key: 'time', align: 'center' },
|
||||
{ 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: '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: 'total_score', align: 'center' },
|
||||
{ title: '自评状态', width: '100px', key: 'scoringrecord_status', customSlot: 'scoringrecord_status', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: '180px',
|
||||
customSlot: 'operator',
|
||||
key: 'operator',
|
||||
fixed: 'right', align: 'center'
|
||||
}
|
||||
])
|
||||
const dataSource = ref()
|
||||
const addButton = ref([
|
||||
{
|
||||
text: "确认",
|
||||
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,
|
||||
evaluation_schedule_id: tab_id.value
|
||||
});
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
layer.msg('提交成功!', { icon: 1 })
|
||||
thisInfo.value = {};
|
||||
infoShow.value = false;
|
||||
getList();
|
||||
} else {
|
||||
layer.msg(res.msg, { icon: 2 })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "取消",
|
||||
callback: () => {
|
||||
infoShow.value = false;
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
const 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: 'content_score',
|
||||
key: "content_score",
|
||||
totalRow: true
|
||||
}
|
||||
];
|
||||
}
|
||||
const dataSource6 = ref([])
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.layui-table-header .layui-table-cell {
|
||||
background-color: #ECF8FA !important;
|
||||
}
|
||||
|
||||
.organization-box {
|
||||
width: calc(100vw - 240px);
|
||||
height: calc(100vh - 110px);
|
||||
margin-top: 10px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.left-tree {
|
||||
display: inline-block;
|
||||
padding: 20px 15px 0 5px;
|
||||
height: 1200px;
|
||||
border-right: 1px solid #e6e6e6;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* todo layui-tree-entry 设置无效 */
|
||||
.layui-tree-entry {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.isFold {
|
||||
position: absolute;
|
||||
top: 36%;
|
||||
right: -10px;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
border-radius: 13px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: inline-block;
|
||||
width: 98%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.isChecked {
|
||||
display: inline-block;
|
||||
background-color: #e8f1ff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.layui-tab-content {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
7
src/views/year_evaluation_summary/examine.vue
Normal file
7
src/views/year_evaluation_summary/examine.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>年度考评汇总管理</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
7
src/views/year_evaluation_summary/index.vue
Normal file
7
src/views/year_evaluation_summary/index.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>年度考评汇总</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
7
src/views/year_evaluation_summary/statistics.vue
Normal file
7
src/views/year_evaluation_summary/statistics.vue
Normal file
@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>统计分析</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user